static text

huaner

10-07-2007 14:18:38

hi:
i found there are many Lable in the demo. i want to ask if the function of this widget is the same as static Text? and there is some way to get the fuction of static Text?

JPro

10-07-2007 17:24:33

For future reference, the demo code is available in the zip file. Go into the QuickGUIDemo folder and you'll see the file (QuickGUIDemo.h). It's well commented so you can reproduce anything you see in the demo you'd like to implement for your own project.

As for your question, there are many widgets capable of displaying text. You specifically mention static text, so I would recommend using QuickGUI::TextBox. You can set this widget as read only using QuickGUI::TextBox::setReadOnly(true).

huaner

11-07-2007 07:26:45

For future reference, the demo code is available in the zip file. Go into the QuickGUIDemo folder and you'll see the file (QuickGUIDemo.h). It's well commented so you can reproduce anything you see in the demo you'd like to implement for your own project.

As for your question, there are many widgets capable of displaying text. You specifically mention static text, so I would recommend using QuickGUI::TextBox. You can set this widget as read only using QuickGUI::TextBox::setReadOnly(true).

hi,JPro;
at first, thank for your reply.
i know there are many ways to display text. but i don't want to that widget has a border, like CEGUI's static text

JPro

11-07-2007 17:06:51

i know there are many ways to display text. but i don't want to that widget has a border, like CEGUI's static text

I'm not sure if you want a border or not, but I believe it defaults with one. To control the border visibility use QuickGUI::TextBox::hideBorders() and QuickGUI::TextBox::showBorders().

kungfoomasta

11-07-2007 21:13:05

If you want just text on the screen, you can make a Label Widget, and set the material to "". This will show just the Text Caption. If you want some kind of background, you can create a material and use that for the label's material.