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

[REBOL] Re: Inform & keyboard

From: gscottjones:mchsi at: 10-Jul-2002 10:18

From: Phil
> I want to put up a dialog box and press Escape > to cancel it or Enter to confirm it. > > But it looks like inform isnt compatible with keyboard input. > Sensors dont seem to work and keyboard shortcuts on buttons dont work
either.
> Its not a showstopper but would make my program more user friendly. > > Any ideas .... or does anyone have some example for me to study?
Hi, Phil, I'm sure that there are several ways. One way is demonstrated as follows: l: layout [ text "Press Return or Escape" key keycode #"^M" [ t/text: "Return" show t unview l ] key keycode escape [ t/text: "Escape" show t unview l ] ] view layout [ t: text 100x16 "none" button "Get Dialog" [ view/new/offset l 100x100 do-events ] ] Hope this helps. (Gotta keep that great email client as user friendly as possible!! :-) --Scott Jones