Skip to content

Instantly share code, notes, and snippets.

@jkour
Created February 12, 2017 23:55
Show Gist options
  • Select an option

  • Save jkour/cee00b9786d8728250ed3f6f2fc85bba to your computer and use it in GitHub Desktop.

Select an option

Save jkour/cee00b9786d8728250ed3f6f2fc85bba to your computer and use it in GitHub Desktop.
FMX TPopupBox Change Event
unit Unit4;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
FMX.Controls.Presentation, FMX.ExtCtrls;
type
TForm4 = class(TForm)
PopupBox1: TPopupBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure PopupBox1Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.fmx}
procedure TForm4.Button1Click(Sender: TObject);
var
i: Integer;
begin
PopupBox1.Clear;
for i := 1 to 50 do
PopupBox1.Items.Add(i.ToString);
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
PopupBox1.ItemIndex:=0;
end;
procedure TForm4.PopupBox1Change(Sender: TObject);
begin
ShowMessage('dfsdg');
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment