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

Udo Sonnabend | WigaSoft AG U.Sonnabend at wigasoft.ch
Tue Sep 13 14:58:34 UTC 2022


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


More information about the omnisdev-en mailing list