I’ve got a problem recently with a nice table like presentation of a text written into a TGListBox by entries.
It looks like the strings that make a TextEntry get reformatted somewhere on fly. So a string by string printout to standard output does look like a nice table, but a TGListBox view is completley not table like.
How do I make it look more like a table? so that a horisontal position of a new colomn would stay same for every single row.
thanks in advance for any usefull comments and help
Igor
I’ve got a problem recently with a nice table like presentation of a text written into a TGListBox by entries.
It looks like the strings that make a TextEntry get reformatted somewhere on fly. So a string by string printout to standard output does look like a nice table, but a TGListBox view is completley not table like.
How do I make it look more like a table? so that a horisontal position of a new colomn would stay same for every single row.
thanks in advance for any usefull comments and help
Igor[/quote]
You should use Courier-like font with the fixed width glyph. You should avoid the proporsional fonts becuase each letter there has its own width. The gaps between letter are different also.
I’ve got a problem recently with a nice table like presentation of a text written into a TGListBox by entries.
It looks like the strings that make a TextEntry get reformatted somewhere on fly. So a string by string printout to standard output does look like a nice table, but a TGListBox view is completley not table like.
How do I make it look more like a table? so that a horisontal position of a new colomn would stay same for every single row.
thanks in advance for any usefull comments and help
Igor[/quote]
You should use Courier-like font with the fixed width glyph. You should avoid the proporsional fonts becuase each letter there has its own width. The gaps between letter are different also.
Hope this helps[/quote]
Thanks!
but how do I access the font settings for TGListBox?
Igor
There are two ways to change the font in TGListBox. The faster one is to change the default setting of the GUI default font in your local .rootrc file. For example, to:Gui.DefaultFont: -adobe-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1
This setting will affect all GUI elements that use the default font (labels, list boxes, combo boxes, etc.). If you want to change the font explicitly for one list box only, please see the attached macro as an example.
With thanks for your patience,
Ilka lbtext.C (2.68 KB)