Label Widget: Size problem

almondega

04-07-2008 03:52:31

hi
how to change the label widget size correct ?
look the code:

imLabel = mSheet->createLabel();
mSheet->setDimensions(QuickGUI::Rect(0,0,1024,768));
//imLabel->setOpacity(0);
imLabel->setSkin("bof");
imLabel->setHorizontalAlignment(QuickGUI::Label::HA_LEFT);
imLabel->setVerticalAlignment(QuickGUI::Label::VA_TOP);
imLabel->setFont(imFontName);
imLabel->setPosition(QuickGUI::Point(windowWidth * leftPad, windowHeight * topPad));
//imLabel->setWidth(width?width:windowWidth - (windowWidth * leftPad));
//imLabel->setHeight(height?height:windowHeight - (windowHeight * topPad));
imLabel->setSize(1024,768);
imLabel->redraw();


look what i got:


this size isnt 1024x768
what i'm forgeting?

tks :wink:

kungfoomasta

04-07-2008 11:14:00

Is the size of the window 1024 x 768? Does creating the label after setting the sheet dimensions change anything? Also, where do you set the text of the label?

almondega

04-07-2008 16:53:46

Is the size of the window 1024 x 768? Does creating the label after setting the sheet dimensions change anything? Also, where do you set the text of the label?

yes, size of window 1024x768
if i dont change the sheet dimension, the widgets size is lower
the text is settings after that code (with \n)

edit: the problem still at 800x600 widget size
:(

kungfoomasta

07-07-2008 17:02:04

I'm not sure why the label area does not resize to the size you want, I would need to look into it to see whats going on. I'm short on time these days, when I get time I will work towards a useable solution that I know works.