Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Disabling shortcut Keys for text field entry?

From: agem:crosswinds at: 7-Jul-2001 17:23

RE: [REBOL] Disabling shortcut Keys for text field entry? [dm128--microconnect--net] wrote:
> I am using short-cut keys with button in REBOL/View is there a way I can > disable them while I have a user entering text in a field? > > layout [ > field "enter text here" > button "Click me" #"c" [Unrelated code] > ] >
[rebol [] la: layout [ button "quit" [quit] ;button "disable" [bu/keycode: none] ;button "enable" [bu/keycode: #"z"] bu: button {#"z"} #"z" "hi" [alert "ping!"] field "to click somewhere else" ar: area {disable hotkey, press #"z" here :)} feel [ ;have to keep old bindings, so patch redraw: func [face act pos] append second :redraw [ either face = system/view/focal-face [ bu/keycode: none ] [ bu/keycode: #"z" ] ] [;original redraw: func [face act pos] [ if all [in face 'colors block? face/colors] [ face/color: pick face/colors face <> view*/focal-face ] ] ]] ] source focus source unfocus probe ar/feel view center-face la ]
> Thank you, > Dave >
;-) Volker