Administrator
|
I see in the old-school layouts that it was possible to use #hResizing:
{#ButtonSpec. ... #hResizing:. #spaceFill... but I'm not sure how to do that now. I tried unsuccessfully: SpecLayout composed newRow: [ :spec | spec newColumn: [ :col | col add: #myLabel; send: #hResizing: withArguments: { #shrinkWrap } ] width: 50; add: #myModel ] height: 30; yourself. I was thinking maybe #add:withSpec: had something to do with it?
Cheers,
Sean |
UI.. how many battles lost on this field..
:) I yet to see a framework which would allow to specify layout (in declarative style) in exact way how user wants it to be. The problem is, that users always want something different than framework proposes :) This is the nature of UI. On 24 April 2013 00:36, Sean P. DeNigris <[hidden email]> wrote: > I see in the old-school layouts that it was possible to use #hResizing: > {#ButtonSpec. > ... > #hResizing:. #spaceFill... > > but I'm not sure how to do that now. I tried unsuccessfully: > SpecLayout composed > newRow: [ :spec | spec > newColumn: [ :col | col > add: #myLabel; > send: #hResizing: withArguments: { #shrinkWrap } ] width: 50; > add: #myModel ] height: 30; > yourself. > > > I was thinking maybe #add:withSpec: had something to do with it? > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Spec-and-e-g-hResizing-tp4683208.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > -- Best regards, Igor Stasenko. |
Administrator
|
Yes! While we're figuring things out, I feel like there /has/ to be some easy way to dig into Morphic until Spec supplies what's needed.
Cheers,
Sean |
In reply to this post by Sean P. DeNigris
Here shrinkWrap will not work since the SpecLayout defines an absolute layout for every widget.
Moreover it's a bit weird since you then specify the height of the column :) If you want to tackle (a bit) this problem ,you may use extent: to do something Adding different layout would also be a solution, but it will require some work :)
Ben
On Apr 24, 2013, at 12:36 AM, Sean P. DeNigris <[hidden email]> wrote: I see in the old-school layouts that it was possible to use #hResizing: |
Administrator
|
Okay, so there's no way currently to do something like shrinkWrap? It seems that there has to be a mechanism in Spec that provides an easy way to get to lower level Morphic things like this, at least until we flesh out exactly what needs to be supported to cover the use cases. #height was going to the row; it was just formatted confusingly In other words, when something changes, manually change the extent to match the contents, simulating shrinkWrap? I'm not exactly sure what you mean. Will you say more?
Cheers,
Sean |
On Apr 24, 2013, at 8:16 PM, Sean P. DeNigris <[hidden email]> wrote: > Benjamin Van Ryseghem-2 wrote >> Here shrinkWrap will not work since the SpecLayout defines an absolute >> layout for every widget. > > Okay, so there's no way currently to do something like shrinkWrap? It seems > that there has to be a mechanism in Spec that provides an easy way to get to > lower level Morphic things like this, at least until we flesh out exactly > what needs to be supported to cover the use cases. Here it's not that trivial, because for #shrinkWrap to make sense, it means that the layout is not a PorportionalLayout, but something more elaborated. > > Benjamin Van Ryseghem-2 wrote >> Moreover it's a bit weird since you then specify the height of the column >> :) > > #height was going to the row; it was just formatted confusingly ok, my bad :) > > Benjamin Van Ryseghem-2 wrote >> If you want to tackle (a bit) this problem ,you may use extent: to do >> something > > In other words, when something changes, manually change the extent to match > the contents, simulating shrinkWrap? Yes, it;s hawkish, but may work. Otherwise you could even rebuild the layout. More hawkish :s > > Benjamin Van Ryseghem-2 wrote >> Adding different layout would also be a solution, but it will require some >> work :) > > I'm not exactly sure what you mean. Will you say more? One could have something like SpecTableLayout composed add: ... or SpecMyStrangeLayout composed add: … But then you have to implement it :) (Should be that complicated though, but still it takes time ^^) Ben > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Spec-and-e-g-hResizing-tp4683208p4683425.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |