Sizes

The most common hints set are related to sizethe minimum and possibly maximum size that your user interface should occupy. Minimum size is almost universally supported; every graphical system will try to allow an application to use as much space as it claims to need. Be sure to have sensible sizes though as, especially when targeting multiple different platform types, the minimum size shouldn't be bigger than the screen available! To avoid this situation, the operating system will probably show your application windows smaller than requested so that the user doesn't have the problem of accessing portions of the user interface that are off-screen. For this reason alone, it's recommended that the minimum size set is truly the smallest size that your GUI will operate correctly. 

So that an application is proportioned correctly when first loaded, it's common to set a default or preferred size (typically through SetDefaultSize(), SetSize(), or Resize()). This means that, as much as possible, your application will load at a sensible size, but smaller if the screen isn't large enough. In the example of our New GoMail email compose window, we can set a good default for typing a large email while having a sensible minimum size (probably calculated by the toolkit) that allows access to all of the input fields.

Additionally, it may be helpful to set a maximum size for your window; while not used as often as minimum or default sized, this can be helpful. Most commonly, this is helpful if you want your window to remain small (such as a toolbox or information window) or expand only in one direction (to allow only height adjustments, or set the minimum and maximum width to the same value). It's also helpful in presenting custom dialog boxes to set the minimum and maximum size to the same value, hence requesting that the window be a fixed size. Some toolkits make this easier by providing a SetFixedSize() function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.53