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

Coloring a line in a browse filled by a queue

Status
Not open for further replies.

clatimier

Programmer
Apr 11, 2003
26
FR
Hi

I try to color a line of a browse filled by a queue.
Coloring a column is not a problem but coloring just one line is a little bit more difficult.

I try to do this in legacy not in Abc

thx
 
To Color a Line in the Browse you need to color all the columns to get the desired effect. You need to make sure that all the columns have the Color attribute set and then use the options of the browse template to set the colors.
If you want to hand code, it has to be in the SetQueueRecord -> Before Parent Call in ABC or Format an Element of the Browse Queue in Legacy. Just make sure the code is embedded after the code generated for default colors by the browse template.

There is a freeware template called ColorAll from Solace Software which takes care of setting your default & conditional color for all the columns.
 
Thanks for your response, but the problem isn't here. I know how to colorate what I want in a browse filled by a DAT file, but here, I want to color in a browse filled by a QUEUE ! And in this case, I can't reach the "Format an element of the browse queue", because this event doesn't exists. I can't check the color attribute in the list bow format of the browse because there's no way to configure it.
I'm going to look the freeware U told me.
But if U have another idea with these precisions, U would be great to help me.
Thx
 
If you are coloring a List Control populated from a manually generated Queue i.e. no templates, then you need to add four LONG fields after every column as shown below

Q QUEUE
A STRING(10)
A_NormalFG LONG !Normal forground color
A_NormalBG LONG !Normal background color
A_SelectedFG LONG !Selected forground color
A_SelectedBG LONG !Selected background color
B STRING(40)
B_NormalFG LONG !Normal forground color
B_NormalBG LONG !Normal background color
B_SelectedFG LONG !Selected forground color
B_SelectedBG LONG !Selected background color
....

As you populate the Queue, you will have to fill in the color fields with appropriate values. Make sure that the Queue is defined in the Data section of the procedure so that you can use the fields to set up the List format. Make sure the COLOR option is set for all the fields.

As explained by me earlier, Coloring a Line on a List Control means coloring all the columns in the List display.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top