Topic: [SOLVED] Dynamic Access Key for controls Using string
Hello guys,
This is to show how to create Access key on controls dynamically.
Example
1. I have a button on the form1
2. I want to change the caption of the button from a string
3. I want to assign access key to the button
Example
...........................
procedure setCaption(Sender:string);
var btnCapStr1:string;
btnCapStr2:string;
begin
btnCap1:='&Action1';//access key on 'A'
btnCap2:='A&ction2';//accesskey on 'c'
Form1.btnAction1.Caption:=btnCapStr1;
Form1.btnAction2.Caption:=btnCapStr2;
end;
Regards