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

Benoit Minisini gambas at ...1...
Sun Mar 30 15:55:33 CEST 2008


On dimanche 30 mars 2008, richard terry wrote:
> 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

You are not doing anything wrong. It is just that the textbox does not lose 
its focus. This is a QT behaviour: using the mouse on a control that does not 
edit text does not necessarily change the focus.

Regards,

-- 
Benoit Minisini




More information about the User mailing list