, ,

Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

setting colors in edittable (OpenInsight 32-Bit)

At 13 JUN 2005 10:27:20PM Paxton Scott wrote:

Greetings. 7.1.1

I'm wanting to set the color of a 'selected' row in an edit table. No problem using Send_message(CtrlEntID,COLOR_BY_POS, 0,row,color)

But, I can not 'reset' all cells back to white as when a different row is selected…I've tried this:

COLOR WHEN CLICKED Declare function Send_Message $Insert colors white=.WHITE-]BACKCOLOR for x=1 to 4 clear=send_message(@window:".OFFICERS","COLOR_BY_POS",x,0,white:@fm:black$:@fm:white:@fm:black$) next x reset=set_property(@window:".OFFICERS",'BACKCOLOR',white)

clear=send_message(@window:".OFFICERS","COLOR_BY_POS",1,0,white) row=.OFFICERS-]SELPOS row=row color= .GROUP_TYPE-]BACKCOLOR text=Send_Message(CtrlEntId, "COLOR_BY_POS", 0, row, color) Which sets it fine, but I can never set it back to white. What am I missing? Thanks, [email protected] [url=http://www.arcscustomsoftware.com]ARCS, Inc. </QUOTE> —- === At 14 JUN 2005 04:24AM [email protected] wrote: === <QUOTE>What is the control WHITE? Could that ever be CtrlEntID? [email protected] The Sprezzatura Group Web Site World Leaders in all things RevSoft </QUOTE> —- === At 14 JUN 2005 09:01AM Paxton Scott wrote: === <QUOTE>Thanks for the reply. No, the control WHITE is just a hidden editfield that I used to get the code for white….before I learned to use $insert color. Old habits die hard. I've tried to set backcolor for the table to white, but that does not seem to work either. [email protected] [url=http://www.arcscustomsoftware.com]ARCS, Inc. </QUOTE> —- === At 14 JUN 2005 09:28AM Paxton Scott wrote: === <QUOTE>Here is some cleaner code: COLOR A ROW WHEN CLICKED (four column edittable)

Declare function Send_Message

$Insert colors

reset to normal colors…this does not seem to work for x=1 to 4 clear=send_message(@window:".OFFICERS","COLOR_BY_POS",x,0,white$:@fm:black$:@fm:white$:@fm:black$) next x row=.OFFICERS-]SELPOS row=row set selected row to pink…work fine

text=Send_Message(CtrlEntId, "COLOR_BY_POS", 0, row, pink$)

RETURN 1

Once a line is pink, I can't seem to "un highlight" it.

[email protected]

[url=http://www.arcscustomsoftware.com]ARCS, Inc.


At 15 JUN 2005 04:33AM [email protected] wrote:

Well, besides that my copy doesn't want to go pink, I changed it to green, and you're right.

However, if I reversed the clear line, so you have

Clear=send_message(@window:".OFFICERS","COLOR_BY_POS",[b]0,X[/b],white$:@fm:black$:@fm:white$:@fm:black$)

instead of

Clear=send_message(@window:".OFFICERS","COLOR_BY_POS",[b]x,0[/b],white$:@fm:black$:@fm:white$:@fm:black$)

that seemed to do the trick.

[email protected]

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 15 JUN 2005 11:31AM Paxton Scott wrote:

Well, this is interesting. I got the results I wanted, by doing as you suggest, COLOR_BY_POS all the lines. I was trying to do it by doing all the columns, because I knew how many columns there were. But somehow it would not repaint all the colums, thereby making the whole edittable normal again.

So, I calculated the number of rows, and then sent COLOR_BY_POS to all the rows and got the job done.

(I defined a pink$ in my colors record…:-)

Thanks for stimulating the brain.

[email protected]

[url=http://www.arcscustomsoftware.com]ARCS, Inc.

View this thread on the Works forum...