Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Consistent sizing of widgets across windowing systems


In general, SWT tries to avoid constraining the "correct" behavior on the platform. This is particularly important on motif, given the degree of user configurability which is possible (via the .Xdefaults file, for example). In addition, if we were to "pick a good size" and attempt to force widgets to match this across operating systems, then we would almost certainly hit cases where either the o/s will not allow you to set the size to this "good" value, or if you could set it, the result would be ugly or unreadable.

The truth of the matter is that, if you are running on multiple native widget sets, you have to be more forgiving of things like layout. Your best bet is to try the layout on all platforms you expect to run the dialog on. I wish I had a better answer for you, but I don't.

McQ.



Joe_Szurszewski@xxxxxxx
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

01/14/2002 06:20 PM
Please respond to platform-ui-dev

       
        To:        platform-ui-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-ui-dev] Consistent sizing of widgets across windowing systems



I have a Dialog with a fair number of UI widgets.  As I've layed out the contents of the Dialog, it looks good on Win32.  However, on Motif, several widgets are lost off the bottom.  On inspection, it appears the problem is that the height of the text widgets is a good bit taller than on Windows.  The funny thing is that text widgets on Motif look to be much larger than necessary for the font in use.  In other words, there is lot more of a top and bottom margin in text widgets on Motif than on Windows.  Is this a problem with Motif?  If not, is there a way to get text widgets to size more closely to the font size without having to create GridData objects for each widget, and set the 'heightHint'?  More generally, are there any strategies in SWT for ensuring similar layouts across windowing systems?


Thanks,

Joe



Back to the top