Gary,
I have a couple of Polymorph based tools (essentially very specialized inspectors for specific data sets), and I would like to get splitters working. So far, I'm getting clobbered. I found some splitter-adding methods in SystemWindow, but I am not clear on whether they are intended for general use?? The browser I am using has working horizontal splitter, but the vertical ones stopped working a couple of versions back, so that might not be the best example to follow. I have not been able to find where the basic inspector creates its spliter. Any enlightenment or places to start browser would be appreciated. Bill _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Bill,
splitters are added automatically for SystemWindow panes. Polymorph does fix the previously erratic behaviour of splitters for SystemWindows, though problems still remain in the general BorderedMorph cases. Splitters are based around the ProportionalLayout specifications for a Morph so particularly unusual layouts have the potential to mess up, though not seen any bad cases myself. While possible to add ProportionalSplitterMorphs manually, it is a little fiddly. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 2:54 PM Subject: [Pharo-project] Stumped on splitters > Gary, > > I have a couple of Polymorph based tools (essentially very specialized > inspectors for specific data sets), and I would like to get splitters > working. So far, I'm getting clobbered. I found some splitter-adding > methods in SystemWindow, but I am not clear on whether they are intended > for general use?? > > The browser I am using has working horizontal splitter, but the vertical > ones stopped working a couple of versions back, so that might not be the > best example to follow. I have not been able to find where the basic > inspector creates its spliter. > > Any enlightenment or places to start browser would be appreciated. > > Bill > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary,
Can you think of a good example of two panes side by side (or one above the other) with a splitter between them? So far, I can't find one that I've been able to follow. Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, January 08, 2010 10:31 AM To: [hidden email] Subject: Re: [Pharo-project] Stumped on splitters Bill, splitters are added automatically for SystemWindow panes. Polymorph does fix the previously erratic behaviour of splitters for SystemWindows, though problems still remain in the general BorderedMorph cases. Splitters are based around the ProportionalLayout specifications for a Morph so particularly unusual layouts have the potential to mess up, though not seen any bad cases myself. While possible to add ProportionalSplitterMorphs manually, it is a little fiddly. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 2:54 PM Subject: [Pharo-project] Stumped on splitters > Gary, > > I have a couple of Polymorph based tools (essentially very specialized > inspectors for specific data sets), and I would like to get splitters > working. So far, I'm getting clobbered. I found some splitter-adding > methods in SystemWindow, but I am not clear on whether they are intended > for general use?? > > The browser I am using has working horizontal splitter, but the vertical > ones stopped working a couple of versions back, so that might not be the > best example to follow. I have not been able to find where the basic > inspector creates its spliter. > > Any enlightenment or places to start browser would be appreciated. > > Bill > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Directly within a System window or added programatically in some submorph?
If directly it should happen automatically. Otherwise try something like this... |leftWidth left right main| leftWidth := 100. left := Morph new color: Color yellow. right := Morph new color: Color green. main := BorderedMorph new changeProportionalLayout; addMorph: left fullFrame: (LayoutFrame fractions: (0@0 corner: 0@1) offsets: (0@0 corner: leftWidth - (ProportionalSplitterMorph splitterWidth // 2) @ 0)); addMorph: right fullFrame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (ProportionalSplitterMorph splitterWidth // 2 + leftWidth@0 corner: 0@0)); addPaneVSplitterBetween: left and: {right}; extent: 200@150. main splitters last addLeftOrTop: left; addRightOrBottom: right. main openInWindow Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 5:36 PM Subject: Re: [Pharo-project] Stumped on splitters > Gary, > > Can you think of a good example of two panes side by side (or one above > the other) with a splitter between them? So far, I can't find one that > I've been able to follow. > > Bill > > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Gary > Chambers > Sent: Friday, January 08, 2010 10:31 AM > To: [hidden email] > Subject: Re: [Pharo-project] Stumped on splitters > > Bill, > > splitters are added automatically for SystemWindow panes. Polymorph does > fix the previously erratic behaviour of splitters for SystemWindows, > though problems still remain in the general BorderedMorph cases. > Splitters are based around the ProportionalLayout specifications for a > Morph so particularly unusual layouts have the potential to mess up, > though not seen any bad cases myself. > > While possible to add ProportionalSplitterMorphs manually, it is a little > fiddly. > > Regards, Gary > > ----- Original Message ----- > From: "Schwab,Wilhelm K" <[hidden email]> > To: <[hidden email]> > Sent: Friday, January 08, 2010 2:54 PM > Subject: [Pharo-project] Stumped on splitters > > >> Gary, >> >> I have a couple of Polymorph based tools (essentially very specialized >> inspectors for specific data sets), and I would like to get splitters >> working. So far, I'm getting clobbered. I found some splitter-adding >> methods in SystemWindow, but I am not clear on whether they are intended >> for general use?? >> >> The browser I am using has working horizontal splitter, but the vertical >> ones stopped working a couple of versions back, so that might not be the >> best example to follow. I have not been able to find where the basic >> inspector creates its spliter. >> >> Any enlightenment or places to start browser would be appreciated. >> >> Bill >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary, That is exactly what I am trying to do. THANKS!!!!!!! Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, January 08, 2010 12:58 PM To: [hidden email] Subject: Re: [Pharo-project] Stumped on splitters Directly within a System window or added programatically in some submorph? If directly it should happen automatically. Otherwise try something like this... |leftWidth left right main| leftWidth := 100. left := Morph new color: Color yellow. right := Morph new color: Color green. main := BorderedMorph new changeProportionalLayout; addMorph: left fullFrame: (LayoutFrame fractions: (0@0 corner: 0@1) offsets: (0@0 corner: leftWidth - (ProportionalSplitterMorph splitterWidth // 2) @ 0)); addMorph: right fullFrame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (ProportionalSplitterMorph splitterWidth // 2 + leftWidth@0 corner: 0@0)); addPaneVSplitterBetween: left and: {right}; extent: 200@150. main splitters last addLeftOrTop: left; addRightOrBottom: right. main openInWindow Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 5:36 PM Subject: Re: [Pharo-project] Stumped on splitters > Gary, > > Can you think of a good example of two panes side by side (or one above > the other) with a splitter between them? So far, I can't find one that > I've been able to follow. > > Bill > > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Gary > Chambers > Sent: Friday, January 08, 2010 10:31 AM > To: [hidden email] > Subject: Re: [Pharo-project] Stumped on splitters > > Bill, > > splitters are added automatically for SystemWindow panes. Polymorph does > fix the previously erratic behaviour of splitters for SystemWindows, > though problems still remain in the general BorderedMorph cases. > Splitters are based around the ProportionalLayout specifications for a > Morph so particularly unusual layouts have the potential to mess up, > though not seen any bad cases myself. > > While possible to add ProportionalSplitterMorphs manually, it is a little > fiddly. > > Regards, Gary > > ----- Original Message ----- > From: "Schwab,Wilhelm K" <[hidden email]> > To: <[hidden email]> > Sent: Friday, January 08, 2010 2:54 PM > Subject: [Pharo-project] Stumped on splitters > > >> Gary, >> >> I have a couple of Polymorph based tools (essentially very specialized >> inspectors for specific data sets), and I would like to get splitters >> working. So far, I'm getting clobbered. I found some splitter-adding >> methods in SystemWindow, but I am not clear on whether they are intended >> for general use?? >> >> The browser I am using has working horizontal splitter, but the vertical >> ones stopped working a couple of versions back, so that might not be the >> best example to follow. I have not been able to find where the basic >> inspector creates its spliter. >> >> Any enlightenment or places to start browser would be appreciated. >> >> Bill >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
For reference, a similar situation with "automagic" SystemWindow stuff...
|main| main := SystemWindow new model: 1. "any object here for this example, otherwise the paneColor comes from first pane morph" left := Morph new minWidth: 30. right := Morph new minWidth: 60. main addMorph: left frame: (0@0 corner: 0.5@1); addMorph: right frame: (0.5@0 corner: 1@1); extent: 200@150. main openAsIs Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 6:13 PM Subject: Re: [Pharo-project] Stumped on splitters > > Gary, > > That is exactly what I am trying to do. THANKS!!!!!!! > > Bill > > > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Gary > Chambers > Sent: Friday, January 08, 2010 12:58 PM > To: [hidden email] > Subject: Re: [Pharo-project] Stumped on splitters > > Directly within a System window or added programatically in some submorph? > If directly it should happen automatically. > > Otherwise try something like this... > > > |leftWidth left right main| > leftWidth := 100. > left := Morph new color: Color yellow. > right := Morph new color: Color green. > main := BorderedMorph new > changeProportionalLayout; > addMorph: left > fullFrame: (LayoutFrame > fractions: (0@0 corner: 0@1) > offsets: (0@0 corner: leftWidth - (ProportionalSplitterMorph > splitterWidth // 2) @ 0)); > addMorph: right > fullFrame: (LayoutFrame > fractions: (0@0 corner: 1@1) > offsets: (ProportionalSplitterMorph splitterWidth // 2 + leftWidth@0 > corner: 0@0)); > addPaneVSplitterBetween: left and: {right}; > extent: 200@150. > main splitters last > addLeftOrTop: left; > addRightOrBottom: right. > main openInWindow > > Regards, Gary > > ----- Original Message ----- > From: "Schwab,Wilhelm K" <[hidden email]> > To: <[hidden email]> > Sent: Friday, January 08, 2010 5:36 PM > Subject: Re: [Pharo-project] Stumped on splitters > > >> Gary, >> >> Can you think of a good example of two panes side by side (or one above >> the other) with a splitter between them? So far, I can't find one that >> I've been able to follow. >> >> Bill >> >> >> >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Gary >> Chambers >> Sent: Friday, January 08, 2010 10:31 AM >> To: [hidden email] >> Subject: Re: [Pharo-project] Stumped on splitters >> >> Bill, >> >> splitters are added automatically for SystemWindow panes. Polymorph does >> fix the previously erratic behaviour of splitters for SystemWindows, >> though problems still remain in the general BorderedMorph cases. >> Splitters are based around the ProportionalLayout specifications for a >> Morph so particularly unusual layouts have the potential to mess up, >> though not seen any bad cases myself. >> >> While possible to add ProportionalSplitterMorphs manually, it is a little >> fiddly. >> >> Regards, Gary >> >> ----- Original Message ----- >> From: "Schwab,Wilhelm K" <[hidden email]> >> To: <[hidden email]> >> Sent: Friday, January 08, 2010 2:54 PM >> Subject: [Pharo-project] Stumped on splitters >> >> >>> Gary, >>> >>> I have a couple of Polymorph based tools (essentially very specialized >>> inspectors for specific data sets), and I would like to get splitters >>> working. So far, I'm getting clobbered. I found some splitter-adding >>> methods in SystemWindow, but I am not clear on whether they are intended >>> for general use?? >>> >>> The browser I am using has working horizontal splitter, but the vertical >>> ones stopped working a couple of versions back, so that might not be the >>> best example to follow. I have not been able to find where the basic >>> inspector creates its spliter. >>> >>> Any enlightenment or places to start browser would be appreciated. >>> >>> Bill >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Or, even more fun
|main topLeft topRight bottomLeft bottomRight| main := SystemWindow new model: 1. "any object here for this example, otherwise the paneColor comes from first pane morph" topLeft := Morph new minWidth: 10. topRight := Morph new minWidth: 60. bottomLeft := Morph new minWidth: 30. bottomRight := Morph new minWidth: 20; minHeight: 40. main addMorph: topLeft frame: (0@0 corner: 0.5@0.5); addMorph: topRight frame: (0.5@0 corner: 1@0.5); addMorph: bottomLeft frame: (0@0.5 corner: 0.5@1); addMorph: bottomRight frame: (0.5@0.5 corner: 1@1); extent: 200@150. main openAsIs Which (for SystemWindow) does the expected thing... two splitters honouring the largest of the specified minima. Regards, Gary ----- Original Message ----- From: "Gary Chambers" <[hidden email]> To: <[hidden email]> Sent: Friday, January 08, 2010 6:21 PM Subject: Re: [Pharo-project] Stumped on splitters > For reference, a similar situation with "automagic" SystemWindow stuff... > > > |main| > main := SystemWindow new model: 1. "any object here for this example, > otherwise the paneColor comes from first pane morph" > left := Morph new minWidth: 30. > right := Morph new minWidth: 60. > main > addMorph: left > frame: (0@0 corner: 0.5@1); > addMorph: right > frame: (0.5@0 corner: 1@1); > extent: 200@150. > main openAsIs > > Regards, Gary > > ----- Original Message ----- > From: "Schwab,Wilhelm K" <[hidden email]> > To: <[hidden email]> > Sent: Friday, January 08, 2010 6:13 PM > Subject: Re: [Pharo-project] Stumped on splitters > > >> >> Gary, >> >> That is exactly what I am trying to do. THANKS!!!!!!! >> >> Bill >> >> >> >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Gary >> Chambers >> Sent: Friday, January 08, 2010 12:58 PM >> To: [hidden email] >> Subject: Re: [Pharo-project] Stumped on splitters >> >> Directly within a System window or added programatically in some >> submorph? >> If directly it should happen automatically. >> >> Otherwise try something like this... >> >> >> |leftWidth left right main| >> leftWidth := 100. >> left := Morph new color: Color yellow. >> right := Morph new color: Color green. >> main := BorderedMorph new >> changeProportionalLayout; >> addMorph: left >> fullFrame: (LayoutFrame >> fractions: (0@0 corner: 0@1) >> offsets: (0@0 corner: leftWidth - (ProportionalSplitterMorph >> splitterWidth // 2) @ 0)); >> addMorph: right >> fullFrame: (LayoutFrame >> fractions: (0@0 corner: 1@1) >> offsets: (ProportionalSplitterMorph splitterWidth // 2 + leftWidth@0 >> corner: 0@0)); >> addPaneVSplitterBetween: left and: {right}; >> extent: 200@150. >> main splitters last >> addLeftOrTop: left; >> addRightOrBottom: right. >> main openInWindow >> >> Regards, Gary >> >> ----- Original Message ----- >> From: "Schwab,Wilhelm K" <[hidden email]> >> To: <[hidden email]> >> Sent: Friday, January 08, 2010 5:36 PM >> Subject: Re: [Pharo-project] Stumped on splitters >> >> >>> Gary, >>> >>> Can you think of a good example of two panes side by side (or one above >>> the other) with a splitter between them? So far, I can't find one that >>> I've been able to follow. >>> >>> Bill >>> >>> >>> >>> -----Original Message----- >>> From: [hidden email] >>> [mailto:[hidden email]] On Behalf Of Gary >>> Chambers >>> Sent: Friday, January 08, 2010 10:31 AM >>> To: [hidden email] >>> Subject: Re: [Pharo-project] Stumped on splitters >>> >>> Bill, >>> >>> splitters are added automatically for SystemWindow panes. Polymorph does >>> fix the previously erratic behaviour of splitters for SystemWindows, >>> though problems still remain in the general BorderedMorph cases. >>> Splitters are based around the ProportionalLayout specifications for a >>> Morph so particularly unusual layouts have the potential to mess up, >>> though not seen any bad cases myself. >>> >>> While possible to add ProportionalSplitterMorphs manually, it is a >>> little >>> fiddly. >>> >>> Regards, Gary >>> >>> ----- Original Message ----- >>> From: "Schwab,Wilhelm K" <[hidden email]> >>> To: <[hidden email]> >>> Sent: Friday, January 08, 2010 2:54 PM >>> Subject: [Pharo-project] Stumped on splitters >>> >>> >>>> Gary, >>>> >>>> I have a couple of Polymorph based tools (essentially very specialized >>>> inspectors for specific data sets), and I would like to get splitters >>>> working. So far, I'm getting clobbered. I found some splitter-adding >>>> methods in SystemWindow, but I am not clear on whether they are >>>> intended >>>> for general use?? >>>> >>>> The browser I am using has working horizontal splitter, but the >>>> vertical >>>> ones stopped working a couple of versions back, so that might not be >>>> the >>>> best example to follow. I have not been able to find where the basic >>>> inspector creates its spliter. >>>> >>>> Any enlightenment or places to start browser would be appreciated. >>>> >>>> Bill >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary,
Thanks again for the examples. I was defeating the automatic mechanism with some extra morphs intended to aid in the layout. Take careful aim at foot; pull trigger ~:) Bill _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary,
The automatic solution is working nicely. One remaining question is how to assign a fixed (or maximum?) size to a given morph? An example would be to have a list and text editor, with the list "always" being 300 pixels wide and the editor getting the remaining space. Bill _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |