Sign in to follow this  
Followers 0
HardCopy

Alternating Line Colour or Font in Treeview?

6 posts in this topic

Hi Fellas

Ive populated a treeview with treeview items

using categories under which display the products in that category.

However i wish to have the Category heading in either a different font or a different coloured text to the product shown in subitems beneath each category:

quick example:

+VEGETABLES

--- Peas

--- Carrots

+ FRUIT

--- Apples

--- Oranges

in short i want the VEGETABLES and FRUIT Category Headers different from their component colour/font.

Ive used GUICtrlSetFont & GUICtrlSetColor to change the main treeview, but using these options on the treeviewitems appears to have no effect.

Anyone help me here?

Thank you

HardCopy :)


Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites



after creating the treeview item you want... use

_GUICtrlTreeViewSetTextColor (-1, ???????)

Needs beta version

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Doesn't work that, it colors all the text for the treeview control.

Far as I know for treeview and listview there is no option to color each item seperate.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Gary is right,

sorry

8(


NEWHeader1.png

Share this post


Link to post
Share on other sites

Doesn't work that, it colors all the text for the treeview control.

Far as I know for treeview and listview there is no option to color each item seperate.

Gary

<{POST_SNAPBACK}>

The words of which i was dreading.

oh well, at least i wont waste an evening, like i already wasted this afternoon trying.

Thx Gary

Hardcopy :)


Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

GUICtrlSetColor works for both.

Check out the screens

maybe fixed in the beta.

If anyone still haven got this , willl share sum code.

Noob

post-14362-1163093528_thumb.gif

post-14362-1163093537_thumb.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0