Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Set Default Font For Empty TextView #147

Closed
apaly opened this issue Aug 24, 2024 · 5 comments
Closed

Cannot Set Default Font For Empty TextView #147

apaly opened this issue Aug 24, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@apaly
Copy link

apaly commented Aug 24, 2024

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

@frang75 frang75 self-assigned this Aug 26, 2024
@frang75 frang75 added the bug Something isn't working label Aug 26, 2024
@frang75
Copy link
Owner

frang75 commented Aug 26, 2024

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.

@apaly
Copy link
Author

apaly commented Aug 26, 2024

Hi @frang75,
Thanks a lot. Your commitment to the library is impressive.

@frang75
Copy link
Owner

frang75 commented Aug 27, 2024

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

@frang75
Copy link
Owner

frang75 commented Aug 27, 2024

Related with this issue: #148

@apaly
Copy link
Author

apaly commented Aug 28, 2024

@frang75, all I can say is wow! to your very quick response to this issue and update of the documentation!

The solution is also well thought out.

Thanks a lot.

@frang75 frang75 closed this as completed Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants