PDA

View Full Version : Window Layout - Custom Sizing



2lights
10th July 2013, 08:50
Notes to understand problem
I have a group box with buttons and a label in a vertical-layout in a window.
The label is set to expanding according to window size.
How do I set the initial window to only display group-box(window is fixed around group box)
When I load an image to label the window size increases, displaying the label
the label size is set to image size(hence initially 0,0)
Since the image is scaled to label(checked property)
I dont need to worry of images smaller than window size.

Problem
how ever if the image is bigger than window size- I want it to maximise the screen
how do I set a maximum window size to fullscreen maximise(for any screen)

I know more or less, how to do it?
Just need some direction
& maybe sample code on comparing image sizes:confused:

or is there another way of hiding label & setting window size smaller until uploading image

Thnks

Santosh Reddy
10th July 2013, 18:03
how ever if the image is bigger than window size- I want it to maximise the screen
if the image is bigger than the window, the window is by default resized to fit the image, unless the window is already maximized


how do I set a maximum window size to fullscreen maximise(for any screen)
Use showMaximized();


is there another way of hiding label & setting window size smaller until uploading image
explicitly hide the label, use hide(), and add a vertical and horizontal spacers outside the group box