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!

Action List problem 1

Status
Not open for further replies.

scharfie

Programmer
May 13, 2001
2
US

I figure there's a simple solution somewhere for this, but here's the problem:

Whenever I assign a component to an Action, the control is disabled at run-time, even though both the control AND the Action are Enabled. I just started programming with Delphi, and I've been teaching myself, but I can't understand why the control is disabled. I did get it to work once by setting the Shortcut property of the action to something, but that no longer works, either. Any help would be greatly appreciated. Thanks
 
Hi,
This is because there is no code written in the Action1Execute(Sender: TObject) method. Double click on Action1 to write code in the method. On double clicking the event OnExecute of Action1 is assigned the Action1Execute(Sender: TObject) method. For starters, put the code: ShowMessage('Hello World'); in the method.
Run the app and u will see that they are enabled! Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
Thanks, I figured it was just a simple problem. I had not yet written any code, because I was just setting up the interface. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top