Cannot Set Default Font For Empty TextView
Closed this issue · 5 comments
Hi @frang75 ,
Thanks for this great library.
I am trying out the TextView control. It seems it isn’t possible to set default font for an empty TextView. I set the font using textview_family
and textview_fsize
and typed some texts using the keyboard but these settings didn’t have any effect. Likewise, I found out that textview_fsize
, textview_afspace
and textview_lspacing
didn’t work for an empty TextView either.
I would really appreciate how I can sent these settings for an empty TextView.
Thanks,
Apaly
Hi @apaly! Thanks for download and use NAppGUI.
The text properties in TextView will be applied in next textview_writef()
. I will fix the control so that they are taken into account in editing.
Implemented on this commit: f6c2ee0
In order not to alter the current operation of the control, the textview_apply_all()
function has been added, which sets the text parameters for the entire control. If the control is empty, they will be taken as default attributes.
Doc: https://nappgui.com/en/gui/textview.html#h4
Demo: https://nappgui.com/en/howto/guihello.html#h6