|
From: Jeff H. <je...@Ac...> - 2005-08-12 17:34:42
|
> > I'm porting more stuff to OS X, and finding that the alternate > > grouping controls (essentially labelframes) might be nice to have. > > See: > > > > http://developer.apple.com/documentation/UserExperience/Conceptual/ > > OSXHIGuidelines/XHIGLayout/chapter_19_section_4.html > In principal, yes, this ought to be possible with custom > styles, but it will be necessary to define a few new elements, and the > labelframe layout algorithm needs to be generalized a bit more. Given the complexity of the rest ... I'm inclined to think that this may well be more appropriate as a snidget (or xidget, should we do xotcl widgets ;) ). At some point, we have to draw the line for where we layer and where we hard-code. > This doesn't work at present, because the [ttk::labelframe] > has non-NULL defaults for -relief and -borderwidth, which will > take precedence. I'm starting to think that these should be removed > altogether (-relief in particular; Tk's standard set of > -relief values don't map onto platform-native border styles > very well). At the > very least, they should be NULL by default so that custom styles > will work. I think some control of the border might be nice (like, if I have -bd 0, no border should really be drawn), but I'm torn on whether fiddling with relief and others is necessary. > Another groupbox style we ought to support is the BWidget > PanelFrame, where the label appears in a shaded box that > extends across the top of the frame. This isn't possible > with the current layout algorithm, but it might work if the > "-labelanchor" option were extended to allow things like > "nwe" in addition to "n", "nw", and "ne". Heh heh ... I wrote that widget too (for our PDK app). I was thinking about integrating that with superframe, but it really does more (allowing you to add buttons into the panel area, which really makes for nice UI). I could see supporting that for the other frame types too, but then I would be forced to do the 'getframe' or 'setwidget' stuff because I would need multiple frames. With superframe, I am really just a tricked out hull - you can put stuff right in it and use it 100% the same as a regular frame. > Then there's things like "disclosure boxes" (commonly used > for e.g., "Show/Hide Advanced Options" sections in dialog > boxes). I think this is currently doable as a snidget, using > a custom [ttk::checkbox] as the -labelwidget. Yes, I could see wanting a whitespace-style labelframe for that. > And lastly: Under OSX, the groupbox background gets > successively darker depending on the nesting level. Tile > can't handle this at all right now (this is The Background Problem.) Isn't this the use of DrawThemeSecondaryGroup instead of DrawThemePrimaryGroup, where we only use the latter? Jeff |