Page 1 of 1

Size of frame close button.

Posted: Sat Mar 15, 2008 08:35
by chendot
Hi, I got a problem about the close button of a FrameWindow.
I set the frame size to a certain value, so that it won't change when resizing the window:

Code: Select all

WindowManager::getSingleton().getWindow("MyFrame")->setSize(UVector2(UDim(0, 256), UDim(0, 256)));


It works good, so as the children window of this frame. but the close button in the right top of the frame was not effected by this method.
Then I add this code:

Code: Select all

(static_cast<FrameWindow*>(WindowManager::getSingleton().getWindow("MyFrame")))->getCloseButton())->setSize(UVector2(UDim(0, 10), UDim(0, 10)));


But it sees still no use... when I resize my appliction window, the close button follow to resize. How can we clip the size of a close button by its parent WindowFrame ?

Posted: Sat Mar 15, 2008 19:45
by CrazyEddie
Hi,

I think you'd have to do this in the looknfeel skin file. For example, in the WindowsLook.looknfeel file at around line 902, you will see the definition of the close button. By changing the stuff between the <Area></Area> tags, you can affect the way the close button is laid out.

HTH

CE.

Posted: Sun Mar 16, 2008 02:46
by chendot
Wow~Thanks CE.

I've got it :wink: