[Gambas-user] Clicking a TreeView item by program

Benoît Minisini gambas at ...1...
Wed Nov 25 13:59:18 CET 2015


Le 25/11/2015 09:07, Rolf-Werner Eilert a écrit :
> In one of my older projects, there was kinda timeout after 2 minutes of
> inactivity. In the TreeView the next parent was jumped at and "clicked"
> to let the data of the child disappear from screen. This is the code,
> "baum" is the TreeView:
>
>           baum.MoveParent
>           baum.Item.Selected = True
>           baum_Click
>
> Now in Gambas3, when the program doesn't have the focus anymore, I get a
> "Null object" error at the baum.Item.Selected line.
>
> I know, Item is for the internal cursor. And I want the real cursor. But
> Current is readonly, right? So how can I set the visible cursor? Or does
> the error come from something quite different?
>
> Regards
> Rolf
>

Provide more code. If baum.Item returns NULL, that should mean that 
MoveParent() failed.

-- 
Benoît Minisini




More information about the User mailing list