Jump to content
Sign in to follow this  
Patrick Winkler

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

Share this post


Link to post

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)    
...

 

Share this post


Link to post

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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...