I make a new control, using TextField and MenuPane.
The contents written down in TextField is shown in MenuPane.
But when MenuPane pop up by "show-adjacent" method with start-traversal?=false, it never disappears.
The contents written down in TextField is shown in MenuPane.
But when MenuPane pop up by "show-adjacent" method with start-traversal?=false, it never disappears.
|
{curl 5.0 applet} {curl-file-attributes character-encoding = "utf8"} {define-class public ListField {inherits TextField} field private _mp:#MenuPane field private _dp:TextDisplay {constructor public {default ...} {construct-super {splice ...}} set self._dp = {TextDisplay} set self._mp = {MenuPane self._dp } } {method public {on-focus-in e:FocusIn}:void {self._mp.show-adjacent self, {self.get-bounds}, alongside?=false, start-traversal?=false } } {method public {on-focus-out e:FocusOut}:void {self._mp.hide} } {method public {on-key-press e:KeyPress}:void set self._dp.value = self.value } } {ListField} |
|---|