equal
deleted
inserted
replaced
19 |
19 |
20 HorizontalPanelView comment:' |
20 HorizontalPanelView comment:' |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.9 1995-05-03 00:29:39 claus Exp $ |
24 $Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.10 1995-05-09 01:55:48 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !HorizontalPanelView class methodsFor:'documentation'! |
27 !HorizontalPanelView class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.9 1995-05-03 00:29:39 claus Exp $ |
45 $Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.10 1995-05-09 01:55:48 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
90 By combining Horizontal- and VerticalPanels (i.e. place a hPanel into a |
90 By combining Horizontal- and VerticalPanels (i.e. place a hPanel into a |
91 vPanel), most layouts should be implementable. |
91 vPanel), most layouts should be implementable. |
92 However, ff none of these layout/space combinations is exactly what you need |
92 However, ff none of these layout/space combinations is exactly what you need |
93 in your application, create a subclass, and redefine the setChildPositions |
93 in your application, create a subclass, and redefine the setChildPositions |
94 method there. |
94 method there. |
|
95 |
|
96 TODO: for completeness, support #fixRight, #fixRightSpace, |
|
97 #rightFit, #rightSpaceFit layouts |
95 " |
98 " |
96 ! |
99 ! |
97 |
100 |
98 examples |
101 examples |
99 " |
102 " |
240 b3 := Button label:'button3' in:p. |
243 b3 := Button label:'button3' in:p. |
241 v extent:300 @ 100. |
244 v extent:300 @ 100. |
242 v open |
245 v open |
243 |
246 |
244 |
247 |
245 example: full fit (vertical is default -> centered) |
248 example: full fit i.e. no spacing (vertical is default -> centered) |
246 |
249 |
247 |v p b1 b2 b3| |
250 |v p b1 b2 b3| |
248 |
251 |
249 v := StandardSystemView new. |
252 v := StandardSystemView new. |
250 p := HorizontalPanelView in:v. |
253 p := HorizontalPanelView in:v. |
533 |
536 |
534 |v p l1 l2 l3| |
537 |v p l1 l2 l3| |
535 |
538 |
536 v := StandardSystemView new. |
539 v := StandardSystemView new. |
537 p := HorizontalPanelView in:v. |
540 p := HorizontalPanelView in:v. |
538 v label:'hL=leftFit'. |
541 v label:'hL=leftFit hS=0; vL=fit'. |
539 |
542 |
540 p horizontalLayout:#leftFit. |
543 p horizontalLayout:#leftFit. |
|
544 p horizontalSpace:0. |
541 p verticalLayout:#fit. |
545 p verticalLayout:#fit. |
542 p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
546 p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
543 |
547 |
544 l1 := ScrollableView for:FileSelectionList in:p. |
548 l1 := ScrollableView for:FileSelectionList in:p. |
545 l1 stayInDirectory:true. |
549 l1 stayInDirectory:true. |
556 l3 := ScrollableView for:FileSelectionList in:p. |
560 l3 := ScrollableView for:FileSelectionList in:p. |
557 l3 directory:nil. |
561 l3 directory:nil. |
558 l3 ignoreParentDirectory:false. |
562 l3 ignoreParentDirectory:false. |
559 v extent:400 @ 300. |
563 v extent:400 @ 300. |
560 v open |
564 v open |
|
565 |
|
566 |
|
567 trouble example: self resizing elements may cause trouble |
|
568 |
|
569 |v p l1 l2 l3| |
|
570 |
|
571 v := StandardSystemView new. |
|
572 p := HorizontalPanelView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:v. |
|
573 |
|
574 l1 := (Label label:'one' in:p) level:-1. |
|
575 l2 := (Label label:'two' in:p) level:-1. |
|
576 l3 := (Label label:'three' in:p) level:-1. |
|
577 |
|
578 v extent:400 @ 300. |
|
579 v open. |
|
580 |
|
581 (Delay forSeconds:5) wait. |
|
582 |
|
583 l1 label:'oneone'. |
|
584 l2 label:'twotwo'. |
|
585 l3 label:'threethree'. |
|
586 |
|
587 |
|
588 fixed trouble example: tell the panel that this situation may happen |
|
589 |
|
590 |v p l1 l2 l3| |
|
591 |
|
592 v := StandardSystemView new. |
|
593 p := HorizontalPanelView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:v. |
|
594 p elementsChangeSize:true. |
|
595 |
|
596 l1 := (Label label:'one' in:p) level:-1. |
|
597 l2 := (Label label:'two' in:p) level:-1. |
|
598 l3 := (Label label:'three' in:p) level:-1. |
|
599 |
|
600 v extent:400 @ 300. |
|
601 v open. |
|
602 |
|
603 (Delay forSeconds:5) wait. |
|
604 |
|
605 l1 label:'oneone'. |
|
606 l2 label:'twotwo'. |
|
607 l3 label:'threethree'. |
561 " |
608 " |
562 ! ! |
609 ! ! |
563 |
610 |
564 !HorizontalPanelView methodsFor:'accessing'! |
611 !HorizontalPanelView methodsFor:'accessing'! |
565 |
612 |