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.
[url=http://www.arcscustomsoftware.com]ARCS, Inc.
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.
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
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.
[url=http://www.arcscustomsoftware.com]ARCS, Inc.