How to change the font of Panel Title?

Started by sakamitz, February 25, 2017, 07:18:32 AM

Previous topic - Next topic

sakamitz

How can I set the font of the marked text?



https://raw.githubusercontent.com/sakamitz/pic-ref/master/newlispforum-paneltitle.PNG">

oofoe

#1
Can you post source for this GUI display? Not even sure how you're displaying it since NewLisp GUIServer doesn't seem to support the AWT Group widget.



If you're just dropping text over a hand drawn group, you can do it using the gs:set-font function.
Testing can show the presence of bugs, but not their absence.

oofoe

#2
OK, see that you're using gs:set-titled-border -- I haven't used that one myself.



Does seem that gs:-set-font won't work for that through the GUIServer.



However, the SWT (successor to AWT which is used by GUIServer, I think) will allow to set a font with the .setFont() method. Perhaps AWT has the same capability and it's just not wired up in the GUIServer. So, if you're comfortable with Java you could get the GUIServer code, find the set-titled-border handler and see if you can change it there, then recompile. See here for possible example: http://stackoverflow.com/questions/7117408/change-group-widget-title-color-in-swt#7118384">//http://stackoverflow.com/questions/7117408/change-group-widget-title-color-in-swt#7118384



Otherwise, make your window a canvas instead and place the widgets and draw the border yourself and label it with the font you prefer.



Another possibility: That looks like a system default font. If you're running in Linux maybe you don't have the "icon" font used for labelling those things installed? I can't remember what the font is, but that would be worth investigating, especially if you see other applications on your system with the same problem.



Good luck!
Testing can show the presence of bugs, but not their absence.

Katyk_Sn

-
#3
No, you can assign an id only for trophy you should change the whole competition and grapich stuff, but competitions that dont have a self trophy uses trophy_0



