I'm working on a document (draft) which will get you going. See bottom. Anton.
> Thanks for answers! > > The next q. is about faces event handling: > I would like to use a layout (form) without help of mouse. > There was some points in couple of documentation files (view > quide and handling events), but no so much. > > So I am interested to find some more detailed description or > some examples about tabing (focusing) throught faces (not just > text fields) and more info about "detect" event using. > > Could you please point me to a link that I missed. > > brgds > Janeks How to add tab-key handling to your custom style Anton Rolls 11-Mar-2004 ToDo: - continue to try to make an example based on blank-face - make better the example based on button - tip: focus sets the caret and text highlight, which we probably don't want in the button, so we can just do some of what focus does for our purpose (but it will add more code) -------------------------- Set style facet - style: 'scroll-table, Add 'tabbed to flags block - flags: [tabbed] Modify feel/engage - trap tab key - focus either event/shift [ctx-text/back-field face][ctx-text/next-field face] Modify feel/redraw - test if face is currently the focal-face, draw it differently (when action = 'show) Modify init - clone edge if it is used in redraw to show focused state -------------------------- view center-face layout [ style my-button button with [ style: 'my-button flags: [tabbed] init: [edge: make edge []] feel: make feel [ append second :redraw bind [ if act = 'show [ face/edge/color: either face = system/view/focal-face [yellow][black] ] ] first first third second :redraw insert skip tail second :engage -5 bind [ if all [ action = 'key event/key = tab ; #"^-" ][ focus either event/shift [ ctx-text/back-field face ][ ctx-text/next-field face ] ] ] second second :engage ] ] button "normal" a: my-button "hello" b: my-button "there" do [focus b] field ] -------------------------- Credits to Frank Sievertsen for his prior work (see nd-styles.r) -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.