Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-02

Menu problem

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hello,

procedure TForm1.popclick(Sender:TObject);
begin
  (Sender as TMenuitem).Checked:= not (Sender as TMenuItem).Checked;
end;

This code checks in properly but never checks out. I'd like a radiolike thing. Only one can checked.
Do you know a solution? Share with me, please. :)
(I use popupmenu of course.)

Joe

Reply by email

Csermák Szabolcs
to Unknown author

Hi!

This code is not enough to make a radio-like menu. You have to parse along the menu items, and set the checked property to false, else if the current item is the sender.

Szabolcs

Show quoted text 18 lines
Hello, procedure TForm1.popclick(Sender:TObject); begin (Sender as TMenuitem).Checked:= not (Sender as TMenuItem).Checked; end; This code checks in properly but never checks out. I'd like a radiolike thing. Only one can checked. Do you know a solution? Share with me, please. :) (I use popupmenu of course.) Joe _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email