I have decided in an XDialog not to handle all the fields at once after finishing input of all, but just field by field while entering data.
I have an XDialog with some fields.
Three are required fields let's call them: Name, Number and Street and they all are now trapped with their own killfocus event.
Testing with some quick 'ENTER'-hits , I try to jump over the required fields.
Sometimes I can jump out of the name and go to Number. At that moment I get a message from the killfocusevent for the required field(Name) but as Number also has lost its focus the Number_killfocus event is fired to.
So must I change the 'killfocus' events into 'change' events? I do not want the user is able to skip a required field.
Who is experienced with this and can advise?
I can understand the working of the events by comparing to other eventnames.
It seems to me that the 'change' event can be compared with 'can save' and 'killfocus' with 'on save' ? Is that right?
How can the other events be compared?
setfocus =
cursor =
changing =
dblclick =
selected
BTW it is difficult to trap the focus events because while debugging. They 'setfocus' and 'killfocus' then every second.
Is there a better trick than these? I just added this few lines while developing
Your suggestions and comments are welcome to.
Ton
I have an XDialog with some fields.
Three are required fields let's call them: Name, Number and Street and they all are now trapped with their own killfocus event.
Testing with some quick 'ENTER'-hits , I try to jump over the required fields.
Sometimes I can jump out of the name and go to Number. At that moment I get a message from the killfocusevent for the required field(Name) but as Number also has lost its focus the Number_killfocus event is fired to.
So must I change the 'killfocus' events into 'change' events? I do not want the user is able to skip a required field.
Who is experienced with this and can advise?
I can understand the working of the events by comparing to other eventnames.
It seems to me that the 'change' event can be compared with 'can save' and 'killfocus' with 'on save' ? Is that right?
How can the other events be compared?
setfocus =
cursor =
changing =
dblclick =
selected
BTW it is difficult to trap the focus events because while debugging. They 'setfocus' and 'killfocus' then every second.
Is there a better trick than these? I just added this few lines while developing
Code:
SELECT CASE "setfocus" $ a_dlg_button .or. "cursor" $ a_dlg_button .or. "change" $ a_dlg_button a_dlg_button = "" END
Your suggestions and comments are welcome to.
Ton
Comment