[Gambas-user] Frame where the first item is not Enabled - focus problem

Fabien Bodard gambas.fr at ...626...
Thu Nov 26 13:17:12 CET 2009


gambas manage the tab order with the zorder of childs...

but the problem seem to be that gambas give focus to desabled
controls... it's no a good behaviour.

2009/11/25 bbb888 <bbruen at ...2308...>:
>
>
>
> bbb888 wrote:
>>
>> In this form I have
>> - several misc controls
>> - a textarea
>> - a frame (with several checkboxes and buttons)
>> - a listview
>> in that order in the heirarchy.
>>
>> In certain conditions, the first item in the frame has it's Enabled
>> property set to false.
>> When this happens and I tab from the textarea to the frame (in actual fact
>> it's done in code using textarea.Next.SetFocus as I have to trap TAB
>> keys), the focus does not go to the first enabled item in the frame.  In
>> fact, it seems to disappear* and a second tab moves the focus to the first
>> control in the form, not the listview.
>> * even the listview_GotFocus handler is never invoked.
>>
>> If the first item in the frame is enabled, the form "works".
>>
>> Is this expected behaviour?  If not, do you think it is something in
>> gambas or in the KDE style (Highcolor Classic) that I am using ?
>>
>> tia
>> Bruce
>>
>> Update: I've tried changing the Frame to a Panel, but apart from losing my
>> title the problem remains.
>>
>
> OK, Ive solved it with
>
>  IF Panel2.Children[0].Enabled THEN
>    Panel2.Children[0].SetFocus
>  ELSE
>    Panel2.Children[1].SetFocus
>  ENDIF
>
> but I wouldn't have thought I'd need to go to thgat extreme?
> --
> View this message in context: http://old.nabble.com/Frame-where-the-first-item-is-not-Enabled---focus-problem-tp26507190p26507550.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list