added get-button-label method to switchable-button%
original commit: 65579793afbebb705080267a37580ec0b94e1e97
This commit is contained in:
parent
6cab7dec39
commit
b77f73f013
|
@ -35,8 +35,10 @@ as little as possible vertical space.
|
|||
}
|
||||
|
||||
@defmethod[(command) void?]{
|
||||
|
||||
Calls the button's callback function.}
|
||||
|
||||
Calls the button's callback function.
|
||||
}
|
||||
|
||||
@defmethod[(get-button-label) string?]{
|
||||
Returns the label of this button.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
[alternate-bitmap bitmap]
|
||||
[vertical-tight? #f])
|
||||
|
||||
(define/public (get-button-label) label)
|
||||
|
||||
(when (and (is-a? label bitmap%)
|
||||
(not (send label ok?)))
|
||||
(error 'switchable-button% "label bitmap is not ok?"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user