Tree List: changing the $tootip based on the line the mouse is over.

Doug Easterbrook doug at artsman.com
Wed Sep 14 00:33:28 UTC 2022


hi Udo.

long time no talk… : (

thanks for the sample and it has the guts of the answer.   I’ve been playing with it a bit

I can get what I want and set a tooltip — mostly.   When I run my mouse up and down the treelist, no other event is generated unltil I move the mouse out of the treelist area and back in

eg the events on the treelist object are

On evMouseEnter
# V1007371 see if we can determine what the line is to make a customtooltip of the line
Calculate line as mouseover(kMLine)
Send to trace log enter line [line]

On evMouseLeave
Calculate line as mouseover(kMLine)
Send to trace log leave line [line]


when I move the cursor down the treelist, I expected a trace to look like 

enter line 1
leave line 1
enter line 2
leave line 2
etc 


however, that is not to be.   it only gives an entry in the tracelog  when you enter the treelist the first time, or move it sideways out of the tree list area and then back in


short of tracking the mouse over the entire window in the main event loop and doing a lot of x-y calculations, I think I’m hooped.   Might be time to ask tech support









Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On Sep 13, 2022, at 7:58 AM, Udo Sonnabend | WigaSoft AG <U.Sonnabend at wigasoft.ch> wrote:
> 
> Hi Doug
> 
> Maybe following Code Sample is what u need.
> 
> Idea:
> An Omnis Tree-Component displays a Subset of  a Tree in deep first order DFS. So travers the tree  in this order by doing $first and $nextnode recursively. Only count visible nodes from $expanded branches and stop if the line number equals the received mouseover(kmline). Put this code behind your mouse event.
> 
> Hope that fits 😉
> 
> Regards,
> Udo.
> 
> 
> If mouseover(kMLine)
> 
>  Calculate line as mouseover(kMLine)
>  Set reference node to $cobj.$first()
>  Calculate count as 1
>  Calculate parentLevel as 0
> 
>  While count<line
> 
>    If node.$count&not(node.$isexpanded)&parentLevel=0
>      Calculate parentLevel as node.$level
>    End If
> 
>    Set reference node to $cobj.$nextnode(node,kTrue)
> 
>    If (node.$level<=parentLevel)|(parentLevel=0)
>      Calculate count as count+1
>      Calculate parentLevel as 0
>    Else
>      # do not count, hidden branch ( = not($isexpanded))
>    End If
> 
>  End While
> End If
> 
> Send to trace log [node().$name]
> 
> 
> 
> WigaSoft AG
> Udo Sonnabend
> Entwickler
> 
> Oberstrasse 222 | Postfach 51 | CH-9014 St. Gallen
> Telefon +41 71 274 51 31 | www.wigasoft.ch<http://www.wigasoft.ch/> | U.Sonnabend at wigasoft.ch<mailto:U.Sonnabend at wigasoft.ch>
> 
> 
> Veranstaltungshinweis
> 25. - 27. Oktober 2022  Besuchen Sie uns an der IFAS Expo<https://www.ifas-expo.ch/de/expo>, der wichtigste Branchentreffpunkt für den Schweizer Gesundheitssektor, sie finden uns in der Halle 7, Stand 30.
> 
> Bestellen Sie jetzt mit unserem Gutscheincode Ihr Eintrittsticket<https://www.ifas-expo.ch/de/ticket?voucher=IFAS2022-WIGASOFT>
> 
> 
> 
> Diese Mitteilung kann persönliche, vertrauliche oder rechtlich geschützte Informationen enthalten und ist nur für die Verwendung durch den beabsichtigten Empfänger bestimmt. Auf Vertraulichkeit oder Rechte wird aufgrund von Fehlübertragungen nicht verzichtet. Wenn Sie nicht der beabsichtigte Empfänger dieser Mitteilung sind, dürfen Sie diese in keiner Form verwenden, verbreiten oder kopieren. Haben Sie diese Mitteilung irrtümlich erhalten, dann löschen Sie diese und allfällige Kopien und benachrichtigen Sie bitte unverzüglich den Absender – besten Dank.
> 
> P Bitte denken Sie an die Umwelt, bevor Sie dieses Mail drucken. Think before print!
> 
> ________________________________
> Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> im Auftrag von Doug Easterbrook via omnisdev-en <omnisdev-en at lists.omnis-dev.com>
> Gesendet: Dienstag, 13. September 2022 00:55
> An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
> Cc: Doug Easterbrook <doug at artsman.com>
> Betreff: Tree List: changing the $tootip based on the line the mouse is over.
> 
> wondering if anybody has figured out how to change the tooltip on a tree list for the current line the mouse is over.
> 
> I’ve determined out this much.    In the events on the tree list, I have
> 
> on evMouseover
>   calculate line as mouseover(kmline)
> 
> 
> 
> and the value of line is the line I just put my mouse over.   it is based on the number of visible lines in the treelist.  for example, if lines 1 and 3 are collapsed,  3 is not and I run the mouse over the
> 4th line, I get a 4
> 4th line, I get a 5
> 
> eg
>> Collapsed (Line 1)
>> Collapsed (Line 2)
>> Expanded (Line 3)
> —— Item 1 (line 4)
> — — Item 2 (line 5)
> 
> 
> 
> since I know the line, I ant to get the $tag for that line the mouse is over — and then I can figoure out what I want my tooltip to change to based on the line.
> 
> 
> 
> has anybody figured out how to  determine the tag as people run the mouse over the tree list with various things expaned and not expanded.
> 
> its easy enough when people click on the line, because you get told the $node
> 
> 
> 
> 
> 
> 
> 
> 
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list