Brett, This is great. I've been able to modify the example for rotary (works as expected) choice (need to use up/down arrows next!) and buttons (not much feedback yet on space engage) I just changed the svvf/<choice>/... to rotary, choice, button and had to add an 'up event on the #" " switch.
One problem is that the ctx-txt/back-field gets lost when you back tab off of the first face. next-field wraps properly. A lot of it is still a mystery, but maybe some of this behavior can be made part of the defaults some day. Let me know if anyone wants to see my mods. Dave Brett Handley wrote: >Hi Dave, > >>Actually, on further research, it appears that this scheme only works >>when hte check is given focus with a [ do focus] - if focus is moves to >>say a field, then there is no way to click on the check and get the >>"space" focus back to it. >> > >Fixed that now. > >>I'm confused. This really shouldn't be that >>hard in a system that's designed for non programmers to make use of. >> > >I think this sort of feature is important, because it is has a long >tradition >in GUIs. VID is a remarkably small GUI framework and I believe RT >will evolve these sort of features in VID over time. Or someone else >will produce a framework that satisfies the standard features list. > >A work in progress I guess. > >Back to the code. >I've worked out now that by testing for mouse down I can set the focus. >I went on provide tabbing between multiple checkboxes. >For bonus marks, I tried highlighting which checkbox actually has focus. > >I haven't thought about how to apply such findings to other styles. >I also don't know if I've broken any VID rules, so I don't know >how or whether it can be applied more generally. > >But maybe it is a couple of steps closer. > >modified-check-feel: [ > > ; Basic highlighting of the checkbox with focus > redraw: function [face action pos] [bvlc cond-c cond-f] [ > cond-c: equal? face/edge/color bvlc: svv/vid-colors/bevel > cond-f: equal? face system/view/focal-face > if equal? cond-c cond-f [ > face/edge/color: either cond-f [black] [bvlc] > ] > svvf/check/redraw face action pos > ] > > ; Space bar toggles check - tab moves to next tabbed item > engage: func [face action event] [ > either equal? event/type 'key [ > switch event/key [ > #" " [ > svvf/check/engage face 'down event > ] > #"^-" [ > focus either event/shift [ > ctx-text/back-field face > ] [ > ctx-text/next-field face > ] > ] > ] > ] [ > if equal? event/type 'down [focus face] > svvf/check/engage face action event > ] > ] > >] > >stylize/master [ > space-check: check with [ > feel: make feel modified-check-feel > flags: [check tabbed] > ] >] > >view layout [ > across > space-check [print "action test first check"] > space-check space-check space-check return > field >] > >Regards, >Brett > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
