[Gambas-user] TreeView.ToolTip a nice-to-have

Benoît Minisini g4mba5 at gmail.com
Mon Jul 12 13:19:39 CEST 2021


Le 12/07/2021 à 13:16, Rolf-Werner Eilert a écrit :
> Am 12.07.21 um 12:31 schrieb Bruce Steers:
>>
>>
>> On Mon, 12 Jul 2021 at 10:31, Rolf-Werner Eilert <rwe-sse at osnanet.de 
>> <mailto:rwe-sse at osnanet.de>> wrote:
>>
>>     Just stumbled over this one: There is no
>>
>>              TreeView.Current.ToolTip
>>
>>     or
>>              TreeView[theKey].ToolTip
>>
>>     right?
>>
>>     Would be a nice thing to have though. Thunderbird (as an example) 
>> makes
>>     use of it, showing mail dirs containing unread messages in bold or
>>     bold+blue AND showing the latest new messages contained in a tooltip.
>>
>>     There is an application of mine which would be happy to have such a
>>     thing.So, Benoit, if one day you are absolutely failing to find
>>     anything
>>     you could improve in Gambas... :)
>>
>>     Regards
>>     Rolf
>>
>>
>> should be fairly easy to make this for your app.
>> Enabling TreeView1.Tracking, using the TreeView1_MouseMove() event, 
>> TreeView1.FindChild() and Balloon()
>> (and possibly a Timer to make things smoother)
>> BruceS
>>
>>
> 
> First result: I am confused :)
> 
> FindChild() offers properties: There is actually .ToolTip (!) and .Tag, 
> but it has neither .Key nor .Text
> 
> How should I find out which child the mouse points at if not using
> 
> Treeview.FindChild(Mouse.X, Mouse.Y).Key  ??
> 
> Strange!
> 
> Regards
> Rolf
> 

FindChild() is the method for finding the child widget of a container. 
TreeView is internally a Container, as every widget written in Gambas, 
even if it has actually no children (except when you edit an item, where 
a temporary text field is created).

Again, Treeview items are -not- widgets, they are not children of the 
TreeView.

-- 
Benoît Minisini


More information about the User mailing list