Jump to content

Set ListBrowser Fill Color


Recommended Posts

Hello,

 

I'm failing to assign a color to a LB cell.

 

It should look like this:

Bildschirmfoto 2016-10-11 um 10.15.34.png

 

# Init
col_color_idx = vs.InsertLBColumn(dialogID, kList_Brws, i, strings.col_clr, 40)
vs.SetLBItemDisplayType(dialogID, kList_Brws, i, 1) #xxx
vs.SetLBColumnOwnerDrawnType(dialogID, kList_Brws, i, col_color_idx, OwnerDrawType_Enum.solid_rect )

...
instert_pos = 0
i = vs.InsertLBItem(dialogID, kList_Brws, instert_pos, '???')
...
vs.SetLBItemFillForeColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)
vs.SetLBItemFillBackColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)
vs.SetLBItemPenBackColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)
vs.SetLBItemPenForeColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)

What am I doing wrong?

 

thanks

 

Edited by Patrick Winkler
Link to comment

I got it, in case some one wants to know how:

 

# Init Column:
...
vs.SetLBItemDisplayType(dialogID, kList_Brws, i, 1) # Icon Only
...


# Add a Line
...
vs.SetLBColumnOwnerDrawnType(dialogID, kList_Brws, i, col_color_idx, 1 ) # Solid Rect
...
vs.SetLBItemFillForeColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)
vs.SetLBItemFillBackColor(dialogID, kList_Brws, i, col_color_idx, redIndex, greenIndex, blueIndex)    
...

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...