Page 1 of 1

Some TreeGadget API's needed:)

Posted: Thu Jun 20, 2002 12:43 pm
by BackupUser
Code updated for 5.20+

Restored from previous forum. Originally posted by Fangbeast.

I wanted to change the colours of all my gadgets and I had everything except TreeGadget so I went digging. Now my colours all match to a nice cool shade that doesn't hurt my eyes.

TreeGadgets API stuff: TreeBox is my handle for that gadget.
------------------------------------------------------------
To change the background colour of a TreeGadget:

Code: Select all

SendMessage_(TreeBox, #TVM_SETBKCOLOR, 0, RGB(137, 188, 245))
The 0 isn't used and must be 0 !!
------------------------------------------------------------
To sort TreeGadget items:

Code: Select all

SendMessage_(TreeBox, TVM_SORTCHILDREN, 0, item)
0 = False (Don't recursively sort from this point)
1 = True (Sort recursively from this point)

item = What item no in the tree to start sorting from

This command apparently does a simple internal, case insensitive compare and doesn't appear to need a callback or any other structure.

------------------------------------------------------------
To delete a TreeGAdget Item:

Code: Select all

SendMessage_(TreeBox, #TVM_DELETEITEM, 0, item)
The 0 isn't used and must be 0 !!

item = What item no in the tree to delete
------------------------------------------------------------
I went to this link to find them and used the APIGuide software to give me the constat values. Hope it help somebody.

http://msdn.microsoft.com/library/en-us ... gimage.asp

Fangles

Posted: Thu Jun 20, 2002 4:11 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Interesting, thanks.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Fri Jun 21, 2002 12:41 am
by BackupUser
Restored from previous forum. Originally posted by Fangbeast.
Interesting, thanks.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
Lots of other stuff there but I don't understand them all yet. But, as I do, I will post them:)

Fangles