[Pharo-users] Spec Layout Help

2018-10-04 Thread Rob Rothwell
Hello, How might one achieve a fixed width column containing fixed width widgets within a resizable row using Spec Layouts? For example: <--- Resizable Space --->| Fixed Width |<---Resizable Space ---> Where the Fixed Width space might have something like a left justified input field and a righ

Re: [Pharo-users] Spec: Layout Problems

2016-10-28 Thread Matteo via Pharo-users
--- Begin Message --- Hi Brad, a quick solution could be to group the first two columns in this way: WidgetBrad class>>defaultSpec ^ SpecLayout composed newRow: [ :r | r newColumn: [ :f | f newRow: [ :k | k

[Pharo-users] Spec: Layout Problems

2016-10-26 Thread Brad Selfridge
Just about the time I think I have Spec layouts figured out, I stump myself all over again. I have a layout that I want to have two variable width columns and one fixed width column. I have created three columns in a row. When I put a single widget in each column, then the columns display as eq

Re: [Pharo-users] Spec layout

2016-05-20 Thread Marion Noirbent
Hi, Thanks, I think i can do it if i take inspiration from your code. I will put too an anotation in the book to correct it. Marion, Le 20/05/2016 00:42, Peter Uhnák a écrit : > Hi, > > I've made a simple example — see attached fileout. > > Couple things to note: > > 1. >> If i put it on i

Re: [Pharo-users] Spec layout

2016-05-19 Thread Peter Uhnák
Hi, I've made a simple example — see attached fileout. Couple things to note: 1. > If i put it on instance side, the lookup don't find it (in the book Building UI with Spec, it said the lookup begin by the instance side and it allow to have specific UI, in part about layout) As far as I know /

Re: [Pharo-users] Spec layout

2016-05-18 Thread Marion Noirbent
Ok, I wait your answer. Thanks for your help. Marion, Le 18/05/2016 12:04, Peter Uhnák a écrit : Yes but someone must call rebuildWidget… I will try to take a look at this today and give a better/more comprehensive example. Peter On Wed, May 18, 2016 at 1:01 PM, stepharo wrote: I do not get

Re: [Pharo-users] Spec layout

2016-05-18 Thread Peter Uhnák
Yes but someone must call rebuildWidget… I will try to take a look at this today and give a better/more comprehensive example. Peter On Wed, May 18, 2016 at 1:01 PM, stepharo wrote: > I do not get it. > > I still think that the solution of peter is the one to implement > > rebuildWidget > s

Re: [Pharo-users] Spec layout

2016-05-18 Thread stepharo
I do not get it. I still think that the solution of peter is the one to implement rebuildWidget self widgets removeAll. self createWidgets. self needFullRebuild: false. self buildWithSpecLayout: self dynamicLayout. self alignButtons dynamicLayout | keys | keys := se

Re: [Pharo-users] Spec layout

2016-05-18 Thread Marion Noirbent
Because I would use "openWithSpec" to build only when the widget is ready, but it call a method (with the good pragma) on the class side. In the example i use i have add RadioButtonModel with addRadioButton: in the collection buttons, it's not empty but RadioButtonModel is a ComposableModel an

Re: [Pharo-users] Spec layout

2016-05-18 Thread stepharo
But why from the class side. buttons ^ buttons returns an empty collection and rebuildWidget self widgets removeAll. self createWidgets. self needFullRebuild: false. self buildWithSpecLayout: self dynamicLayout. self alignButtons Le 18/5/16 à 11:31, Marion Noirbent a

Re: [Pharo-users] Spec layout

2016-05-18 Thread Marion Noirbent
I was trying to use it but i have still the problem to call the instance method from the class side, so i call the buildWithSpecLayout: in the method to add buttons in the collection, it seems work but i have an "MessageNotUnderstood" RadioButton>>layout: Le 18/05/2016 09:20, stepharo a écrit

Re: [Pharo-users] Spec layout

2016-05-18 Thread stepharo
marion the solution is what peter proposes. Stef Le 18/5/16 à 11:14, Marion Noirbent a écrit : In fact i was trying to modify RadioButtonGroup to turn it into a widget, #buttons is not a widget but its collection of widget. May you have confused RadioButtonGroup with the MenuModel / MenuGro

Re: [Pharo-users] Spec layout

2016-05-18 Thread Marion Noirbent
In fact i was trying to modify RadioButtonGroup to turn it into a widget, #buttons is not a widget but its collection of widget. May you have confused RadioButtonGroup with the MenuModel / MenuGroupModel / MenuItemModel which are widgets. I take inspiration from them and I would got the same

Re: [Pharo-users] Spec layout

2016-05-17 Thread stepharo
Thanks Johan We looked at RadioButtonGroupExample but you see we cannot have a RadioButtonGroupPresenter having 2, 3 or 4 radioButton. Stef Le 17/5/16 à 18:52, Johan Fabry a écrit : Hi Marion, the class side message of defaultSpec is generally meant to be used if you use a fixed number

Re: [Pharo-users] Spec layout

2016-05-17 Thread Johan Fabry
Hi Marion, the class side message of defaultSpec is generally meant to be used if you use a fixed number of widgets, so you can put the reference to the name of each widget there (in cour case #buttons). For variable number of widgets you should have a look at the dynamic features of Spec. Tha

Re: [Pharo-users] Spec layout

2016-05-17 Thread Peter Uhnák
I don't have time right now to give you a proper example… however if you have layout on the instance side, then you need to call the build method explicitly with the proper layout… well, that's what I do at least https://github.com/dynacase/dynacase/blob/master/repository/DynaCASE-Spec.package/DC

[Pharo-users] Spec layout

2016-05-17 Thread Marion Noirbent
Hi, I'm trying to create a widget whith Spec, managing a collection of RadioButton. But I have a problem with defaultSpec (the accessor of the collection is the methods "buttons") : If i put defaultSpec on class side, i can't acces the collection of the instance. (the following code iterate o

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-12 Thread Bahman Movaqar
On 11/12/2013 22:58, Benjamin wrote: > >>> Put in other words: >>> 1. The default behaviour (if there's any other behaviour) of a >>> text box in Spec, doesn't accept ENTER. A multi-line text entry >>> without ENTER doesn't make sense, no? > > What enter does then ? Nothing :-) > >>> 2. The

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-12 Thread Benjamin
Ben On 12 Nov 2013, at 19:46, b...@openinworld.com wrote: > Bahman Movaqar wrote: >> On 11/12/2013 17:29, Benjamin wrote: >> >>> On 11 Nov 2013, at 20:08, Bahman Movaqar >> >> >>> >> >>> > wrote: >> >>> >> >> When a window is res

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-12 Thread btc
Bahman Movaqar wrote: On 11/12/2013 17:29, Benjamin wrote: >>> On 11 Nov 2013, at 20:08, Bahman Movaqar >>> >>> > wrote: >>> When a window is resized, every Row/ColumnLayoutdistributes the width and height evenly among any wid

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-12 Thread Bahman Movaqar
On 11/12/2013 17:29, Benjamin wrote: On 11 Nov 2013, at 20:08, Bahman Movaqar > wrote: When a window is resized, every

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-12 Thread Benjamin
On 12 Nov 2013, at 04:11, Bahman Movaqar wrote:On 11/11/2013 22:52, Benjamin wrote:I do not get the image, but I know what happened :)Oops!  Corrected that.No problem :)On 11 Nov 2013, at 20:08, Bahman Movaqar > wrote:When a window

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-11 Thread Bahman Movaqar
On 11/11/2013 22:52, Benjamin wrote: > I do not get the image, but I know what happened :) Oops! Corrected that. > > On 11 Nov 2013, at 20:08, Bahman Movaqar > wrote: > >> >> When a window is resized, every Row/ColumnLayoutdistributes the width >> and height evenly am

Re: [Pharo-users] Spec - Layout behaviour when resizing

2013-11-11 Thread Benjamin
I do not get the image, but I know what happened :) On 11 Nov 2013, at 20:08, Bahman Movaqar wrote: > Hi all, > > Let's assume I have a window like the one in episode 2 of the tutorial. Some > unexpected (from the user's perspective) behaviour happens when I manually > resize the window. A

[Pharo-users] Spec - Layout behaviour when resizing

2013-11-11 Thread Bahman Movaqar
Hi all, Let's assume I have a window like the one in episode 2 of the tutorial. Some unexpected (from the user's perspective) behaviour happens when I manually resize the window.  A snapshot is worth a thousand words (and I'm going to put two snapshots