--- a/UpDownButton.st Fri Sep 06 17:17:36 2002 +0200
+++ b/UpDownButton.st Fri Sep 06 18:59:19 2002 +0200
@@ -362,22 +362,33 @@
!
initializeButtonForms
- |upLabel downLabel|
+ |upLabel downLabel upPref downPref prefW prefH|
orientation == #vertical ifTrue:[
- upLabel := ArrowButton UpArrowForm.
- downLabel := ArrowButton DownArrowForm.
+ upLabel := ArrowButton defaultWIN32ArrowButtonFormForDirection:#up onDevice:nil.
+ downLabel := ArrowButton defaultWIN32ArrowButtonFormForDirection:#down onDevice:nil.
] ifFalse:[
- downLabel := ArrowButton LeftArrowForm.
- upLabel := ArrowButton RightArrowForm.
+ downLabel := ArrowButton defaultWIN32ArrowButtonFormForDirection:#left onDevice:nil.
+ upLabel := ArrowButton defaultWIN32ArrowButtonFormForDirection:#right onDevice:nil.
].
upButton label:upLabel.
downButton label:downLabel.
+ upPref := upButton preferredExtent.
+ downPref := downButton preferredExtent.
+
+ orientation == #vertical ifTrue:[
+ prefW := upPref x max:(downPref x).
+ prefH := upPref y + (downPref y).
+ ] ifFalse:[
+ prefW := upPref x + (downPref x).
+ prefH := upPref y max: (downPref y).
+ ].
+
+ self preferredExtent:prefW@prefH.
!
initializeButtons
-
upButton := ArrowButton upIn:self.
upButton autoRepeat:true.
@@ -391,5 +402,5 @@
!UpDownButton class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/UpDownButton.st,v 1.18 2001-07-27 21:13:13 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/UpDownButton.st,v 1.19 2002-09-06 16:59:19 cg Exp $'
! !