取消
显示结果 
搜索替代 
您的意思是: 

Change string indicator background color when in focus

已解决!
转到解答

Hi, I know how I can change the background color for a string indicator using property Text.BGColor.

My question is how can I change this only when the indicator is in Focus, I mean when the cursor is in that field.

As soon as the cursor goes to another string indicator I would like the color to follow the cursor so to say.

0 项奖励
1 条消息(共 5 条)
5,027 次查看

Use an event structure with the Mouse Enter and Mouse Leave events. You could combine all the events in to one event case and use the Control Reference output for the event to change the specific control's color.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 项奖励
2 条消息(共 5 条)
5,022 次查看
解答
已被主题作者 hasse 接受

1. Go give this idea a Kudos: Key focus Event

2. You could do something like this in a loop



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
3 条消息(共 5 条)
5,010 次查看

That idea deserves Kudos indeed.

 

If your user will be tabbing between controls, OP will have to poll the focus just like crossrulz suggests.

If mouse events will be satisfactory, the best way to do this would be with an event structure, so your polling isn't using up processing power.

Color Me Sherbet.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 项奖励
4 条消息(共 5 条)
5,002 次查看

Thanks, that works exactly as I wanted. Thanks also James for your input.

0 项奖励
5 条消息(共 5 条)
4,978 次查看