Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text Color - SysTreeView32

How can I set the text color on a tree view ?

See Attached Image.

Attached Files Image(s)
This works too !

One followup question....Is there a way to define font/color/style for each line of a treeview ??

Thx in advance
Oh...and also...

How do I define TVM_SETBKCOLOR value (4381&)?
Step1. Check Options -> Files -> Use optional reference files.
Step2. In editor type TVM_SETBKCOLOR, press F2 or Ctrl+Click, and copy/paste the definition.

If you have QM 2.2.0, you don't need to define it. Or you can do Step2.

In both cases you can use it without definition by typing "WINAPI." before:

#6 it...

Any clues on my previous question....different text attributes on different lines of tree view ?
Is it in a custom dialog that you created in QM, or is it in another app?

Explorer-style dialog
Yes...its working...i have a custom dialog

Since, data is loaded dynamically, how do i force a refresh on the tree to reflect the colors... I modified DEX_TvCustomDraw as follows :

Select All      Help

out cd.nmcd.dwDrawStage
sel cd.nmcd.dwDrawStage
    case CDDS_PREPAINT ret CDRF_NOTIFYITEMDRAW ;;yes, notify me to draw items
        if cd.nmcd.lItemlParam > 0 and Mail_Data_Loaded = 1
            if Mail_Data_Folders_Unread[cd.nmcd.lItemlParam-1] != "0"
                cd.clrText = 0xFF0000
                cd.clrText = 0x000000
            cd.clrText = 0x000000
    case else ret
another question related to this...

How do I change the "Selection" row text colors ?

Tried a few combinations...not working :-(
To repaint a control, can be used RedrawWindow. Example:

RedrawWindow(id(4 hDlg) 0 0 RDW_INVALIDATE)

Not sure if it is possible to change selected item colors. Unsuccessfully tried in the past.
Thx for all the help, Gi
With treeview: is there a way to set the colors of folders and subfolders via regex of the folder names?

Forum Jump:

Users browsing this thread: 1 Guest(s)