[Gambas-user] textbox.lost focus not triggering (2.4 or 2.99 build 1266)

richard terry rterry at ...1822...
Sun Mar 30 04:50:54 CEST 2008


When moving form textbox to textbox on a form the lost focus triggers.

However when moving from textbox to a checkbox it seems not to.

Sample enclosed.  (tried it in 2.4 and 2.99)

At first glance it seems like as soon as you click on the checkbox that the 
focus gets put back onto the previous control (here a checkbox), because the 
cursor flashes again in the textbox, so I assumed that this was the problem 
and that the got_focus event was just re-setting the color.

However I put a printout in the console and incremented the value of the 
statement and tried again, and it dosn't increment the value when you move 
from the textbox to the next none- textbox control.

Now interestingly I explored this further on my project form with dozens of 
controls and found that some controls and not others triggered the event, so 
I've added a bunch of these to demonstrate.

I'm using this technique to highlight a textbox on a form with many controls, 
(not using this garish colour!!!!), to ensure the user knows exactly where 
they are, because my forms are like a sheet of paper (no borders on the 
textboxes), and don't want the last textbox filled in still hightlighted as 
the user (me) moves on to the next section.


Hopefully Its just something I'm doing wrong in code.

Any help appreciated.

Regards

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lostfocus-0.0.1.tar.gz
Type: application/x-tgz
Size: 8562 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080330/aeb81082/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lostfocus_event.png
Type: image/png
Size: 41550 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080330/aeb81082/attachment.png>


More information about the User mailing list