It appears I have 2 problems. This one is more serious In D5 I could set the Down property of a TSpeedButton which I use as a toggle option in my program. I need the user to see that it is up or down which represents off or on.
I have GroupIndex set to 1, which according to the help, is the only requirement, but manually setting the Down property to True does not work. A test immediately afterwards shows it as False. Any ideas anyone?
Regards,
Ross.
Ross
I don't think there should be any problem here. Does this example help? Clicking SpeedButton1 toggles SpeedButton2.
Kit Jackson
object Form1: TForm1
Left = 192
Top = 107
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object SpeedButton1: TSpeedButton
Left = 24
Top = 28
Width = 23
Height = 22
OnClick = SpeedButton1Click
end
object SpeedButton2: TSpeedButton
Left = 64
Top = 28
Width = 23
Height = 22
AllowAllUp = True
GroupIndex = 1
end
endunit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons;
type
TForm1 = class(TForm)
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var Form1: TForm1;
implementation
{$R *.dfm}procedure TForm1.SpeedButton1Click(Sender: TObject); begin SpeedButton2.Down := not SpeedButton2.Down; end;
end.
_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
