Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! My ddlb is all black?

Status
Not open for further replies.

Hurricane766

IS-IT--Management
Nov 30, 2004
34
CA
Hi,

I have a datawindow with a number of rows being returned. One of the columns is a dropdownlistbox. I want this column's background color to change based on values in two other columns. Like this:

Code:
st_mod = 'action.Background.Mode=0'
st_ret = dw_main.Modify(st_mod)
IF st_ret <> '' THEN MessageBox(st_ret, st_mod)	
	
st_mod = "action.Background.Color = '" &
	+ String(0) &
	+ "~tIf(compute_3 = compute_4," &
	+ String(RGB(0,255,0)) &
	+ ",If(compute_3 < compute_4," &
	+ String(RGB(0,255,255)) &
	+ ",If(compute_3 > compute_4," &
	+ String(RGB(255,0,0)) &
	+ "," &
	+ String(RGB(0,0,0)) &
	+ ")))'"
st_ret = dw_main.Modify(st_mod)
IF st_ret <> '' THEN MessageBox(st_ret, st_mod)

This sets the background color and works nicely... Except when you click on the arrow to open the drop down list - it's all black and as such none of the text for any of the items shows up.

I'm not sure why this is happening, I've even tried changing the color of the text to white to see if it will show up in the drop down but it doesn't - everything is still all black.

Does anyone have any ideas?

 
Opps. The last part of the modstring RGB(0,0,0) is turning it all black... I wanted RGB(255, 255, 255).
 
HI hurricane766,

my question here is not for PB, but how to make code aereas in a reply like you did it above.
I do not find any help-sites here in tek-tips.com nor a link to send a question to the admin / support for this forum. can you help?
 
Hey,

It's called TGML. You'll notice that when you're posting, just under your message it says email notificaiton, emoticons/smileys, and process TGML. If you want more info just click the "Process TGML" hyperlink.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top