Page 1 of 1

Tiny text in Listbox ?

Posted: Sat Dec 24, 2005 22:42
by MandM
In my Console window the text in the listbox isn't appearing at all. The console window is basicly a framewindow with a listbox and editbox. Text appears fine in the editbox when typing. But it refuses to appear in the listbox, for some reason it appears very small (if thats what it is).

Here is a screenshot to demonstrate the problem, you'll notice there is a vertical scrollbar which means there are several ListboxItems, if you focus you'll see some extremely tiny black stuff which i'm presuming are text.

Image

Re: Tiny text in Listbox ?

Posted: Sun Dec 25, 2005 15:30
by MandM
hmm, i tried switching to taharezlook and it worked. So can someone tell me why its not working for windowslook ? I'm using WindowsLook by default

Re: Tiny text in Listbox ?

Posted: Sun Dec 25, 2005 23:38
by lindquist
set the text colour.
what you're seeing is white text and some artifacts produced by something bad in the text rendering code.

Re: Tiny text in Listbox ?

Posted: Mon Dec 26, 2005 04:17
by MandM
I tried setting a million colours, nothing worked. And shouldn't the colour be chosen by default from the look. TaharezLook seems to know to choose white due to its black background, why not the same with WindowsLook ?

Re: Tiny text in Listbox ?

Posted: Tue Dec 27, 2005 03:50
by lindquist
list items are not windows.
Taharez works because the default is white.

the best way to use them is to inherit from ListboxTextItem and set the default _you_ want in the constructor.

are you saying that the setting the colour did not solve the problem?

Re: Tiny text in Listbox ?

Posted: Tue Dec 27, 2005 13:57
by MandM
I was setting the Listbox Colour values from the layout file, didn't think they wouldn't work with the ListboxTextItem (why not btw !?) but I set it through code and it worked fine.


Also, i got another related problem. I was using

Code: Select all

<Property Name="Size" Value="w:1 h:0.3"/>

in my layout file to adjust the FrameWindow's size, the Listbox had a w:1 & h:0.85 . For some wierd reason now the listbox appears Over the FrameWindow's title bar, and the close button just appears floating in mid-air instead of being attached to the menu (since its now hidden by the listbox). any ideas why ? It used to work before as you can see in the screenshot.

Re: Tiny text in Listbox ?

Posted: Sat Dec 31, 2005 00:23
by phoenix
MandM wrote:
I was setting the Listbox Colour values from the layout file, didn't think they wouldn't work with the ListboxTextItem (why not btw !?)


As lindquist said before, ListboxItems aren't windows, so you cannot assign properties to them via xml.


But, apart from that, I have a similar problem. At least I guess that it is somehow related to this thread's issue. As you can see from the image below, my ListboxItems are also truncated. Although I should note that I use a MultiColumnList here.

[img align=left]http://www.wyverex-cave.net/stuff/cegui.jpg[/img]

In this image I use the Marti skin but the results are the same for the Taharez skin.
Reducing the font size also has no effect.

Any ideas?

Re: Tiny text in Listbox ?

Posted: Sat Dec 31, 2005 12:28
by phoenix
Ok, my problem was caused by the font I used. It seems to have a raised baseline or something like that. At least it has a vertical offset that isn't compensated by the GUI so it is truncated at the top.

@MandM:
Since the text is properly displayed in your editbox, your problem seems to have another cause than mine. At least you know that there's no problem with your font ;)