Re: [Xswt-developer] Xswt-developer Digest, Vol 2, Issue 5
Brought to you by:
dvorme
|
From: David J. O. <dj...@co...> - 2006-08-18 03:31:54
|
Hallvard Tr=E6tteberg wrote: > David,=20 > =20 >> -----Original Message----- >> Date: Sun, 09 Jul 2006 13:29:20 -0500 >> From: "David J. Orme" <dj...@co...> >> Subject: [Xswt-developer] New task list >> >> Hallvard, >> >> b) I've extended the style sheet test, and added comments=20 >> about additional style sheet things it would be nice to support. >> =20 > > Concerning this suggestion (cut from the style test): > > <!-- Should be able to just define grabHorizontal on the layoutData > and make it apply to any GridData on any type of object --> > <composite x:id=3D"grabHorizontal"> > <layoutData x:class=3D"gridData" > grabExcessHorizontalSpace=3D"true" horizontalAlignment=3D"FILL"/> > </composite> > > Is this meant to declare that all children added to a composite with th= is > style should automatically "inherit" this particular layout data? I'm n= ot > sure if it makes sense to have a mechanism where a parent style pushes > default values into the children. In this case it makes less sense, sin= ce > layout data may apply to the parent (as a child) and the child. > > Perhaps you can clarify the suggestion? > =20 Sure. :-) Right now I think there's no way to define a style for a layoutData? What I think I wanted to write in the style sheet was the following: <composite> <layoutData x:id=3D"grabHorizontal" x:class=3D"gridData" bla bla bla/> </composite> Then I could have the following in a regular XSWT file: <composite> <layoutData x:style=3D"styles.grabHorizontal"/> </composite> which would be much more concise than the usual bag of attributes that=20 normally come with grabbing horizontally. :-) I don't know if this is=20 hard in the current implementation, but notice that the meta x:class=20 attribute is implicitly included in the style too. Does this make sense? Do you agree that this is a good idea? Regards, Dave Orme |