When I use a popup, the controls appear to be disabled, or not working somehow. Could you tell me why?
The code below is a simple form, with two panels and a button. The panel always visible shows a radio button and edit that work all the time - I can click in the edit and type. Click the button to show the popup, and it too has a radio button and edit, but the radio is shown different to normal (but clicks) and the edit here does not allow typing.
I used Codesite to compare the properties, but it shows nothing significant.
How do I get the components to work on the popup please?
unit Unit2;
interface
uses
SysUtils, Types, UITypes, Classes, Variants, FMX_Types, FMX_Controls, FMX_Forms,
FMX_Dialogs, FMX_TMSBaseControl, FMX_TMSPopup, FMX_Edit;
type
TForm2 = class(TForm)
PopupDemo: TTMSFMXPopup;
panelPopup: TPanel;
radioPopup: TRadioButton;
radioForm: TRadioButton;
Button1: TButton;
panelForm: TPanel;
StyleBook1: TStyleBook;
editForm: TEdit;
editPopup: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$IFDEF Codesite}
uses CodesiteLogging;
{$ENDIF}
procedure TForm2.Button1Click(Sender: TObject);
begin
PopupDemo.Popup;
{$IFDEF Codesite}
Codesite.Send('editPopup', editPopup);
Codesite.Send('editForm', editForm);
Codesite.Send('panelPopup', panelPopup);
Codesite.Send('panelForm', panelForm);
Codesite.Send('PopupDemo', PopupDemo);
{$ENDIF}
end;
{$R *.lfm}
end.
object Form2: TForm2
Left = 0
Top = 0
Caption = 'Form2'
ClientHeight = 480
ClientWidth = 320
Visible = False
StyleBook = StyleBook1
StyleLookup = 'backgroundstyle'
object PopupDemo: TTMSFMXPopup
Position.Point = '(64,48)'
Width = 190.000000000000000000
Height = 250.000000000000000000
TabOrder = 0
AutoPosition = False
DetailControl = panelPopup
Placement = plBottomCenter
PlacementTarget = Button1
HeaderButtons = <>
FooterButtons = <>
FooterText = 'Footer'
HeaderText = 'Header'
FooterHeight = 24.000000000000000000
HeaderHeight = 24.000000000000000000
ArrowHeight = 11.000000000000000000
ArrowWidth = 23.000000000000000000
Version = '1.1.1.0'
object panelPopup: TPanel
Position.Point = '(8,56)'
Width = 177.000000000000000000
Height = 145.000000000000000000
Visible = False
TabOrder = 0
object radioPopup: TRadioButton
Position.Point = '(24,24)'
Width = 120.000000000000000000
Height = 19.000000000000000000
TabOrder = 0
Text = 'radioPopup'
end
object editPopup: TEdit
Position.Point = '(32,80)'
Width = 100.000000000000000000
Height = 22.000000000000000000
TabOrder = 2
KeyboardType = vktDefault
Password = False
end
end
end
object Button1: TButton
Position.Point = '(120,16)'
Width = 80.000000000000000000
Height = 22.000000000000000000
OnClick = Button1Click
TabOrder = 1
Text = 'Button1'
end
object panelForm: TPanel
Position.Point = '(144,320)'
Width = 120.000000000000000000
Height = 100.000000000000000000
TabOrder = 2
object radioForm: TRadioButton
Position.Point = '(8,33)'
Width = 120.000000000000000000
Height = 19.000000000000000000
TabOrder = 0
Text = 'radioForm'
end
object editForm: TEdit
Position.Point = '(8,64)'
Width = 100.000000000000000000
Height = 22.000000000000000000
TabOrder = 2
KeyboardType = vktDefault
Password = False
end
end
object StyleBook1: TStyleBook
Resource.Strings = (
'object _1: TLayout'
' Align = alClient'
' Position.Point = '#39'(0,33)'#39
' Width = 452.000000000000000000'
' Height = 784.000000000000000000'
' object TLayout'
' StyleName = '#39'RadioButtonstyle'#39
' Position.Point = '#39'(166,382)'#39
' Width = 121.000000000000000000'
' Height = 21.000000000000000000'
' object TLayout'
' Align = alLeft'
' Width = 20.000000000000000000'
' Height = 21.000000000000000000'
' object TEllipse'
' StyleName = '#39'background'#39
' Align = alCenter'
' Position.Point = '#39'(2,3)'#39
' Locked = True'
' Width = 15.000000000000000000'
' Height = 15.000000000000000000'
' HitTest = False'
' Fill.Kind = bkGradient'
' Fill.Gradient.Points = <'
' item'
' Color = claWhite'
' end'
' item'
' Color = xFFD9D9D9'
' Offset = 1.000000000000000000'
' end>'
' Stroke.Color = xFF424242'
' object TEllipse'
' Align = alCenter'
' Locked = True'
' Width = 15.000000000000000000'
' Height = 15.000000000000000000'
' Opacity = 0.001000000047497451'
' HitTest = False'
' Fill.Kind = bkGradient'
' Fill.Gradient.Points = <'
' item'
' Color = xFF373737'
' end'
' item'
' Color = xFF838383'
' Offset = 1.000000000000000000'
' end>'
' Stroke.Color = xFF242734'
' object TFloatAnimation'
' Duration = 0.100000001490116100'
' Trigger = '#39'IsChecked=true'#39
' TriggerInverse = '#39'IsChecked=false'#39
' StartValue = 0.001000000047497451'
' StopValue = 1.000000000000000000'
' PropertyName = '#39'Opacity'#39
' end'
' end'
' object TEllipse'
' StyleName = '#39'checkmark'#39
' Align = alClient'
' Position.Point = '#39'(4,4)'#39
' Locked = True'
' Width = 7.000000000000000000'
' Height = 7.000000000000000000'
' Padding.Rect = '#39'(4,4,4,4)'#39
' Opacity = 0.001000000047497451'
' HitTest = False'
' Fill.Kind = bkGradient'
' Fill.Gradient.Points = <'
' item'
' Color = xFFFEFEFE'
' end'
' item'
' Color = xFFDBDBDB'
' Offset = 1.000000000000000000'
' end>'
' Stroke.Kind = bkNone'
' object TFloatAnimation'
' Duration = 0.100000001490116100'
' Trigger = '#39'IsChecked=true'#39
' TriggerInverse = '#39'IsChecked=false'#39
' StartValue = 0.001000000047497451'
' StopValue = 1.000000000000000000'
' PropertyName = '#39'Opacity'#39
' end'
' end'
' end'
' end'
' object TText'
' StyleName = '#39'text'#39
' Align = alClient'
' Position.Point = '#39'(21,2)'#39
' Locked = True'
' Width = 99.000000000000000000'
' Height = 19.000000000000000000'
' Padding.Rect = '#39'(1,2,1,0)'#39
' HitTest = False'
' Text = '#39'RadioButton'#39
' end'
' end'
'end')
end
end