03-11-2021, 10:00 AM
Hello.
How do I control the accessibility of buttons in a modal window?
In delphi, I would do something like this:
Button1.Enabled: = ChechkBox1.Checked and (ComboBox.ItemIndex <> -1);
But in IWModalWindow Buttons is a TStringList. How do I access the properties of buttons? I've tried like this :
var
Button: TIWButton;
begin
Button: = TIWButton (ModalWindow.Buttons.Objects[0]);
Button.Enabled: = false // Button = nil
end;
But it doesn't work.
Or not to use ModalWindow.Buttons for such cases? Just use the standard buttons taken from the palette and added inside the ModalWindow panel?
How do I control the accessibility of buttons in a modal window?
In delphi, I would do something like this:
Button1.Enabled: = ChechkBox1.Checked and (ComboBox.ItemIndex <> -1);
But in IWModalWindow Buttons is a TStringList. How do I access the properties of buttons? I've tried like this :
var
Button: TIWButton;
begin
Button: = TIWButton (ModalWindow.Buttons.Objects[0]);
Button.Enabled: = false // Button = nil
end;
But it doesn't work.
Or not to use ModalWindow.Buttons for such cases? Just use the standard buttons taken from the palette and added inside the ModalWindow panel?