Making GUI fields act like character fields

cthulhugeek

New Member
Hi,

So I am doing a GUI version of our CHUI system so that we can implment some graphic ocx's and images into our system. But one thing the president of the company is adament about is that the screens work very similair to the chui screens. So far so good. But one thing is that in CHUI screens when you hit return it goes to the next field and when you hit return on the last field it does a "GO" function. I cant seem to get my gui input fields to work like this. I tried using:

ON RETURN ANYWHERE APPLY "TAB"

But this only seems to work on character fields, number fields it just tabs to the last position in the field and does not go to the next field. And of course in the last field it does not apply a "GO".

Any thoughts? Thanks so much to those that have helped me with previous questions. Much appreciated.

Don
 
there's session:data-entry-return = yes, but again it won't work in every case.

here's another thing you could try

Code:
on "return" anywhere do:

    /* find next *sensitive* tab item */

    define var wdgh as widget no-undo.
    wdgh = self:next-tab-item.

    do while valid-handle( wdgh ) and not wdgh:sensitive:
        wdgh = wdgh:next-tab-item.
    end.



    if not valid-handle( wdgh ) then /* if last *sensitive* tab item */
        apply "go".
    else apply "tab".

    return no-apply.

end. /* return */

one more thing, it doesn't always turn out for the best to always say yes. though maybe in this case it is. but there were a few cases where i wish i hadn't said, well, i guess we can do that.

i'm currently a consultant and some of the time my customers ideas are border line ridiculous, unpractical and even an illegal one (regulatory compliance). and although i try to almost never say no (because i'd like to keep my job) it's sometimes better to suggest alternatives.
 
> one more thing, it doesn't always turn out for the best to always say yes.

Amen. While they might think this involves less retraining because it is the same as what is there now, what it does is to make it different from anything else that works on that PC. What a nightmare.
 
If you use the UPDATE command with session:data-entry-return = yes you should get the result you want.

Alternatively, use a trigger on the last field:
on return of last_field in frame whatever do:
assign last_field.
apply "go" to last_field in frame whatever.
end.
 
Back
Top