[newbie] FlapsTab in SystemWindow

Martín Altobello martin_altobello at yahoo.com.ar
Mon Feb 18 17:09:48 UTC 2002


First I'd like to thank Mr. Bijan Parsia and Mr. Benoit St-Jean for kindly answering my previous question, it worked! :-)

Our baby (little, but still, our baby) is growing and getting nicer. Now, we have encountered another problem that has us "jammed".

In our proyect we have a number of chemical compounds that are added to a chemical solution to find the present ion. 

We managed that like this:


(...)

archivoOC _ 'ic.obj'.
(FileDirectory default fileExists:archivoOC)
ifFalse:[archivoOC _ self readyToGo].

rS _ ReferenceStream fileNamed:archivoOC.
iC _ rS next.
rS close.

(...)

reactivosMorph := RectangleMorph new.
reactivosMorph layoutPolicy: TableLayout new;
       listDirection: #leftToRight;
      hResizing: #shrinkWrap; vResizing: #shrinkWrap;
     layoutInset: 10; cellInset: 5;
    assureExtension; name:'reactivos';
    color: (TranslucentColor r:1.0 g:0.452 b:0.645 alpha:0.447);
    borderColor: (Color blue);
    borderColor: ((reactivosMorph borderColor) alpha: 0.1).

(...)

mainMorph _ MyWindow new.
mainMorph allowReframeHandles: false;
   clipSubmorphs: true;
   setLabel: 'Marcha Quimica-Analitica Cation-Anion';
   setStripeColorsFrom: (Color r: 0.167 g: 0.49 b: 0.785);
   paneColor: (Color r: 0.167 g: 0.49 b: 0.785);
   borderColor: (Color r: 0.167 g: 0.49 b: 0.785).

(...)


(iC at: 1) do:[:i|  reactivosMorph addMorph: ((MyButton new initializeWithThumbnail:i withLabel:(i externalName) andSend: #agregar: to: self) assureExtension; name:(i externalName); setProperty:#nombre toValue:(i extension valueOfProperty:#nombre))]. 

(...)

mainMorph addMorphCentered:reactivosMorph.
reactivosMorph bottomRight: ((mainMorph bottomRight x) - 2)@(mainMorph bottomRight y).

(...)

MyButton is subclass of IconicButton ... just to do some overriding to give it the "looks" we wanted; same happens with MyWindow which is subclass of SystemWindow).

Now, we decided we need to group the chemical reactives according to their "chemical group". We'll have from 4 to 6 IconicButtons in each group, and we tried doing that with FlapsTab. We searched on the Swiki, Squeakdoc, and tried doing "some more overriding" but so far... no luck.

Either when we "click" on the "flap"... it opens up on the "World" instead of mainMorph (our SystemWindow), or ... when we do some "overrriding" :-) .... nothing happens or it just disrupts all the other submorphs of the SystemWindow :-( 

We'd appreciate any help whatsoever on this subject as we are clearly lost. Again, sorry to bother you all and thanks in advance,

Martín






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020218/0fc70924/attachment.htm


More information about the Squeak-dev mailing list