--- a/ExtendedComboBox.st Sun May 23 17:43:06 1999 +0200
+++ b/ExtendedComboBox.st Sun May 23 18:07:40 1999 +0200
@@ -793,7 +793,7 @@
openMenu
"pull the menu - triggered from the button
"
- |h w menuOrigin menuPrfExt widgetPrfExt useableExt|
+ |h w menuOrigin widgetPrfExt useableExt|
openAction notNil ifTrue:[
openAction numArgs == 0 ifTrue:[
@@ -802,28 +802,25 @@
openAction value:menuWidget
]
].
-
menuWrapper isNil ifTrue:[
menuWidget isNil ifTrue:[^ self].
menuWrapper := MenuWrapper new.
menuWrapper for:menuWidget in:self.
- menuWrapper createWithAllSubViews.
].
menuButton turnOn.
- menuOrigin := device translatePoint:(0@height) from:(self id) to:(device rootWindowId).
- useableExt := device usableExtent.
- menuPrfExt := menuWrapper preferredExtent.
- widgetPrfExt := menuWidget preferredExtent.
+ menuOrigin := device translatePoint:(0@height) from:(self id) to:(device rootWindowId).
+ useableExt := device usableExtent.
+ widgetPrfExt := menuWrapper preferredExtent.
menuHeight isNil ifTrue:[
- menuHeight := (5 + menuPrfExt y) min:(useableExt y // 2).
+ menuHeight := (5 + widgetPrfExt y) min:(useableExt y // 2).
].
usePreferredWidthForMenu ifFalse:[
w := width
] ifTrue:[
- (w := widgetPrfExt x+(menuWrapper borderWidth*2) "menuPrfExt x") <= width ifTrue:[
+ (w := widgetPrfExt x+(menuWrapper borderWidth*2)) <= width ifTrue:[
w := width
] ifFalse:[
(w + menuOrigin x) > useableExt x ifTrue:[
@@ -857,15 +854,8 @@
preferredExtent
"compute & return the preferredExtent from the components' preferrences
"
-
^ (widget preferredExtent max:(widget widthOfContents @ widget heightOfContents))
+ (margin * 2) + 8.
-
-"/ |x y|
-"/
-"/ x := widget widthOfContents + 8.
-"/ y := widget heightOfContents + 8.
-"/ ^ x @ y
!
widget
@@ -1080,5 +1070,5 @@
!ExtendedComboBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/ExtendedComboBox.st,v 1.11 1999-03-25 15:57:47 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/ExtendedComboBox.st,v 1.12 1999-05-23 16:07:40 cg Exp $'
! !