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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse with color

Status
Not open for further replies.

Lengliz

Programmer
Feb 15, 2005
29
TN
Hi,

Can i use different color for columns or lines or fields conditions ( exp: IF>0 in Green IF<0 in Red ) with browse?

Thank you
LENGLIZ
 
Hi Mike,

it's exactly what i am looking for, but using the code above i get the error message:

oBrowse is not an object?

Lengliz
 
I got the same error when I pasted Mike's code into a short program. The first line of code executes and displays the (vanilla colour) Browse window. The second line generates the "not an object" error. If I do a DISP MEMO then I can see that OBROWSE exists as an object but its value is .NULL. Declaring oBrowse as Public or Local makes no difference.

Totally missed that part. Duh.
I'm with you Dave. When did they sneak this one past us?

Geoff Franklin
 

Lengliz / Geoff,

You're right about the "not an object" error. To fix it, put NOWAIT on the end of the BROWSE command.

The reason is that, when you call BROWSE from a program, the window will have closed (and therefore the object released) by the time you get to the next line. NOWAIT keeps the window open -- assuming that's what you want.

I also had a small error in the third line: FonName should be FontName.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks
it works fine

&&
USE myTable
BROWSE NAME oBrowse NOWAIT
oBrowse.SetAll("DynamicForeColor","IIF(F>0, RGB(128,0,0), RGB(0,128,0))")
&&

LENGLIZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top