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

Delphi Action Object

Status
Not open for further replies.

ElenaKB

Programmer
Jun 24, 2008
6
GB
I am trying to use Action Objects to keep several of my components in sync and to act on an OnClick event only once. The components are not menu items or toolbar buttons as in all the Action examples. I think I have discovered a problem that could almost be called a bug in Delphi, but can anyone confirm this? I am using Delphi 7.

The client components (a TSpeedButton in this case) of an Action object get some of their properties set by the Action Object. I am having problems with the property GroupIndex. In order to have my speed button work the way I want, i.e. mimic a check box, this Group Index property has to be >0. But the Action's Group Index should be set to 0, because if it is >0 then it identifies the group to which the action belongs and it will behave like a radio button instead of a check box.

This is the first time that I am using Action Lists, so I might be missing something here, but I certainly haven't managed to get my buttons to work the way I want yet.

Any tips appreciated,
- Elena




 
set the buttons AllowAllUp to True
set each actions GroupIndex to a different value

action1 groupindex 1
action2 groupindex 2
action3 groupindex 3
etc..

buttons now act as a checkbox, click down, click up

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top