Recent

Author Topic: TTreeView HotTrack?  (Read 10697 times)

ned_flanders

  • New Member
  • *
  • Posts: 26
TTreeView HotTrack?
« on: September 27, 2013, 10:21:12 pm »
How can I get the Treeview to show a handpoint cursor and underline the node the mouse is above?

I have a lot of treenodes and it would make navigating the tree a bit more friendly to the user. Imagine a hyperlink in your webbrowser, I would like the same for treenodes in a TTreeview. I thought Hottrack would do it but for me it does not seem to do anything.

Thanks.

wp

  • Hero Member
  • *****
  • Posts: 12800
Re: TTreeView HotTrack?
« Reply #1 on: September 27, 2013, 10:43:21 pm »
Turning on the Option tvoHotTrack (or just setting HotTrack to true) underlines the node underneath the mouse. Not sure about the hand cursor, though.

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: TTreeView HotTrack?
« Reply #2 on: September 27, 2013, 11:30:17 pm »
Been a few years since I was on Linux, but HotTrack was not implemented on GTK2.  Which OS are you on?
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

wp

  • Hero Member
  • *****
  • Posts: 12800
Re: TTreeView HotTrack?
« Reply #3 on: September 27, 2013, 11:41:24 pm »
Win - see footer

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: TTreeView HotTrack?
« Reply #4 on: September 28, 2013, 06:03:55 am »
Win - see footer

Excellent :-)   But I was actually asking the OP, as he was the one with the Hot track issues.  I suspect he's trying with the GTK2 implementation.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

zeljko

  • Hero Member
  • *****
  • Posts: 1751
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TTreeView HotTrack?
« Reply #5 on: September 28, 2013, 10:05:38 am »
Win - see footer

Excellent :-)   But I was actually asking the OP, as he was the one with the Hot track issues.  I suspect he's trying with the GTK2 implementation.

Problem is not in LCL  but in Gtk2.

ned_flanders

  • New Member
  • *
  • Posts: 26
Re: TTreeView HotTrack?
« Reply #6 on: September 28, 2013, 01:22:57 pm »
Tried in Windows running Lazarus v1.0.12 also and does not seem to be working :-\

Tested in a new empty project, added a treeview and added nodes at designtime, turned Hottrack on and tvoHotrack is true in options, still no hottrack when running the project  :-\

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TTreeView HotTrack?
« Reply #7 on: September 28, 2013, 01:24:34 pm »
When asking these kinds of questions, it's always useful to
- mention Laz+FPC+OS version (ok, win+Laz 1.0.12+FPC 2.6.2)
- include a sample project as a zip if possible (project/publish project, zip up, attach to post)
See first link in signature.
thanks.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ned_flanders

  • New Member
  • *
  • Posts: 26
Re: TTreeView HotTrack?
« Reply #8 on: September 28, 2013, 01:50:11 pm »
you're right BigChimp and normally I would, for some reason mentioning those details eluded me this time  %)

BeniBela

  • Hero Member
  • *****
  • Posts: 927
    • homepage
Re: TTreeView HotTrack?
« Reply #9 on: October 02, 2013, 10:26:36 pm »
You might want to try my TTreeListView.

It should support hottracking (although I have never used it)

Zoran

  • Hero Member
  • *****
  • Posts: 1948
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TTreeView HotTrack?
« Reply #10 on: October 03, 2013, 02:53:57 pm »
You might want to try my TTreeListView.

It should support hottracking (although I have never used it)

Don't forget that it is released under GPL, which means that we cannot use it unless our software is also under GPL.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

BeniBela

  • Hero Member
  • *****
  • Posts: 927
    • homepage
Re: TTreeView HotTrack?
« Reply #11 on: October 04, 2013, 12:33:47 am »
All software should be under the GPL

It is evil otherwise

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: TTreeView HotTrack?
« Reply #12 on: October 04, 2013, 02:48:20 am »
GPL should be treated as religion be proud that you support it but do not try to shove it down my throat.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TTreeView HotTrack?
« Reply #13 on: October 04, 2013, 09:34:20 am »
All software should be under the GPL

It is evil otherwise
Could you stop making these wild claims? I agree with what taazz said.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Zoran

  • Hero Member
  • *****
  • Posts: 1948
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TTreeView HotTrack?
« Reply #14 on: October 04, 2013, 10:14:47 am »
All software should be under the GPL

It is evil otherwise

Then do not use RTL, do not use FCL, do not use LCL, they are evil.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

 

TinyPortal © 2005-2018