1- #!/usr/bin/env python
1+ #!/usr/bin/env python3
22#----------------------------------------------------------------------------------
33# Name: CtrlsDemoFrm
44# Purpose: More demonstration showing more controls, with more properties and
@@ -88,73 +88,75 @@ def __config_comps(self):
8888 self .mi_exit .SetProps (Parent = self .mi_file , Text = "Exit" , OnClick = (lambda sender : Application .Terminate ()))
8989 self .od_style .SetProps (Filter = "FireMonkey Styles|*.style;*.fsf" )
9090
91- self .sb_status .SetProps (Parent = self , Padding = Bounds (RectF (2 , 5 , 30 , 5 )), Position = Position (PointF (0 , 5 )), ShowSizeGrip = True )
92- self .sb_status .Size .SetProps (Size = SizeF (835 , 29 ), PlatformDefault = False )
93-
91+ self .sb_status .SetProps (Parent = self , Padding = Bounds (RectF (2 , 5 , 30 , 5 )), Position = Position (PointF (0 , 5 )),ShowSizeGrip = True )
92+ try :
93+ self .sb_status .Size .SetProps (Size = SizeF (835 , 29 ), PlatformDefault = False )
94+ except Exception as e :
95+ print (e )
9496 self .lbl_status .SetProps (Parent = self .sb_status , Text = "TStatusBar" , Position = Position (PointF (2 , 5 )))
9597
9698 self .lbl_scale_text .SetProps (Parent = self .sb_status , Text = "100%" , Align = "Right" )
97- self .lbl_scale_text .Size .SetProps (Size = SizeF (38 , 19 ), PlatformDefault = False )
99+ # self.lbl_scale_text.Size.SetProps(Size = SizeF(38, 19), PlatformDefault = False)
98100 self .lbl_scale_text .TextSettings .SetProps (HorzALign = "Center" )
99101
100102 self .tb_scale .SetProps (Parent = self .sb_status , Align = "Right" , CanParentFocus = True , Frequency = 0.1 , Max = 1.0 , Min = 0.5 , Orientation = "Horizontal" , TabOrder = 2 , Value = 1 )
101- self .tb_scale .Size .SetProps (Size = SizeF (116 , 19 ), PlatformDefault = False )
103+ # self.tb_scale.Size.SetProps(Size = SizeF(116, 19), PlatformDefault = False)
102104 self .tb_scale .SetProps (OnChange = self .__on_tb_scale_change )
103105
104106 self .lbl_scale_label .SetProps (Parent = self .sb_status , Text = "Scale:" , Align = "Right" )
105- self .lbl_scale_label .Size .SetProps (Size = SizeF (57 , 19 ), PlatformDefault = False )
107+ # self.lbl_scale_label.Size.SetProps(Size = SizeF(57, 19), PlatformDefault = False)
106108 self .lbl_scale_label .TextSettings .SetProps (HorzALign = "Center" )
107109
108110 self .lo_control .SetProps (Parent = self , Align = "Client" , OnResize = self .__on_lo_control_resize )
109111
110112 self .lo_control_root .SetProps (Parent = self .lo_control , HitTest = True , Padding = Bounds (RectF (5 , 5 , 5 , 5 )), Margins = Bounds (RectF (5 , 5 , 5 , 5 )), Position = Position (PointF (5 , 5 )))
111- self .lo_control_root .Size .SetProps (Size = SizeF (825 , 500 ), PlatformDefault = False )
113+ # self.lo_control_root.Size.SetProps(Size = SizeF(825, 500), PlatformDefault = False)
112114
113115 self .tc_tabs .SetProps (Parent = self .lo_control_root , Align = "Client" , Margins = Bounds (RectF (4 , 4 , 4 , 4 )), TabIndex = 4 , TabPosition = "Top" )
114116
115117 self .__config_std_comps ()
116118
117119 def __config_std_comps (self ):
118120 self .ti_standard .SetProps (Parent = self .tc_tabs , IsSelected = False , Text = "Standard" )
119- self .ti_standard .Size .SetProps (Size = SizeF (68 , 26 ), PlatformDefault = False )
121+ # self.ti_standard.Size.SetProps(Size = SizeF(68, 26), PlatformDefault = False)
120122
121123 self .lbl_sb .SetProps (Parent = self .ti_standard , Position = Position (PointF (265 , 18 )), Text = "ListBox & ListBoxItem" , TabOrder = 0 )
122- self .lbl_sb .Size .SetProps (Size = SizeF (127 , 17 ), PlatformDefault = False )
124+ # self.lbl_sb.Size.SetProps(Size = SizeF(127, 17), PlatformDefault = False)
123125
124126 self .lbl_text_box .SetProps (Parent = self .ti_standard , Position = Position (PointF (20 , 16 )), Text = "Edit" , TabOrder = 0 )
125- self .lbl_text_box .Size .SetProps (Size = SizeF (52 , 17 ), PlatformDefault = False )
127+ # self.lbl_text_box.Size.SetProps(Size = SizeF(52, 17), PlatformDefault = False)
126128
127129 self .edt_text_box .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 32 )), Text = "some text" , TabOrder = 2 , HelpType = "htKeyword" )
128- self .edt_text_box .Size .SetProps (Size = SizeF (110 , 24 ), PlatformDefault = False )
130+ # self.edt_text_box.Size.SetProps(Size = SizeF(110, 24), PlatformDefault = False)
129131
130132 self .sb_1 .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 211 )), Value = 33 , ViewportSize = 20 , SmallChange = 0 , TabOrder = 3 , Orientation = "Horizontal" )
131- self .sb_1 .Size .SetProps (Size = SizeF (179 , 18 ), PlatformDefault = False )
133+ # self.sb_1.Size.SetProps(Size = SizeF(179, 18), PlatformDefault = False)
132134 self .sb_1 .SetProps (OnChange = self .__on_change_sb_1 )
133135
134136 self .sb_2 .SetProps (Parent = self .ti_standard , Position = Position (PointF (218 , 77 )), ViewportSize = 0.2 , SmallChange = 0 , TabOrder = 4 , Orientation = "Vertical" )
135- self .sb_2 .Size .SetProps (Size = SizeF (18 , 154 ), PlatformDefault = False )
137+ # self.sb_2.Size.SetProps(Size = SizeF(18, 154), PlatformDefault = False)
136138
137139 self .cb .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 71 )), TabOrder = 5 , IsChecked = True , Text = "CheckBox" )
138- self .cb .Size .SetProps (Size = SizeF (119 , 19 ), PlatformDefault = False )
140+ # self.cb.Size.SetProps(Size = SizeF(119, 19), PlatformDefault = False)
139141
140142 self .rb_1 .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 95 )), TabOrder = 6 , Text = "RadioButton" )
141- self .rb_1 .Size .SetProps (Size = SizeF (94 , 19 ), PlatformDefault = False )
143+ # self.rb_1.Size.SetProps(Size = SizeF(94, 19), PlatformDefault = False)
142144
143145 self .rb_2 .SetProps (Parent = self .ti_standard , Position = Position (PointF (113 , 95 )), TabOrder = 7 , IsChecked = True , Text = "RadioButton" )
144- self .rb_2 .Size .SetProps (Size = SizeF (98 , 19 ), PlatformDefault = False )
146+ # self.rb_2.Size.SetProps(Size = SizeF(98, 19), PlatformDefault = False)
145147
146148 self .pg .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 251 )), Value = 33 )
147- self .pg .Size .SetProps (Size = SizeF (384 , 18 ), PlatformDefault = False )
149+ # self.pg.Size.SetProps(Size = SizeF(384, 18), PlatformDefault = False)
148150
149151 self .ai .SetProps (Parent = self .ti_standard , Position = Position (PointF (146 , 32 )), StyleLookup = 'labelstyle' , Enabled = True )
150- self .ai .Size .SetProps (Size = SizeF (23 , 24 ), PlatformDefault = False )
152+ # self.ai.Size.SetProps(Size = SizeF(23, 24), PlatformDefault = False)
151153
152154 self .lb_ani_indicator .SetProps (Parent = self .ti_standard , Position = Position (PointF (171 , 37 )), TabOrder = 10 , Text = 'Ani indicator' )
153- self .lb_ani_indicator .Size .SetProps (Size = SizeF (80 , 15 ), PlatformDefault = False )
155+ # self.lb_ani_indicator.Size.SetProps(Size = SizeF(80, 15), PlatformDefault = False)
154156 self .lb_ani_indicator .TextSettings .HorzAlign = "Center"
155157
156158 self .lb_string .SetProps (Parent = self .ti_standard , Position = Position (PointF (272 , 39 )), TabOrder = 11 , DisableFocusEffect = True , ItemHeight = 19.00 )
157- self .lb_string .Size .SetProps (Size = SizeF (127 , 166 ), PlatformDefault = False )
159+ # self.lb_string.Size.SetProps(Size = SizeF(127, 166), PlatformDefault = False)
158160 self .lb_string .DefaultItemStyles .SetProps (ItemStyle = '' , GroupHeaderStyle = '' , GroupFooterStyle = '' )
159161
160162 self .lb_string .Items .Add ("ListBoxItem" )
@@ -181,7 +183,7 @@ def __config_std_comps(self):
181183 self .lb_string .Items .Add ("ListBoxItem" )
182184
183185 self .cb_string .SetProps (Parent = self .ti_standard , Position = Position (PointF (15 , 126 )), ItemHeight = 19.00 , ListBoxResource = 'transparentlistboxstyle' , TabOrder = 12 )
184- self .cb_string .Size .SetProps (Size = SizeF (179 , 23 ), PlatformDefault = False )
186+ # self.cb_string.Size.SetProps(Size = SizeF(179, 23), PlatformDefault = False)
185187
186188 self .cb_string .Items .Add ("ListBoxItem" )
187189 self .cb_string .Items .Add ("ListBoxItem" )
@@ -207,52 +209,52 @@ def __config_std_comps(self):
207209 self .cb_string .Items .Add ("ListBoxItem" )
208210
209211 self .btn_glyph .SetProps (Parent = self .ti_standard , Position = Position (PointF (126 , 298 )), TabOrder = 13 , Text = "Glyph" )
210- self .btn_glyph .Size .SetProps (Size = SizeF (100 , 26 ), PlatformDefault = False )
212+ # self.btn_glyph.Size.SetProps(Size = SizeF(100, 26), PlatformDefault = False)
211213
212214 self .pnl .SetProps (Parent = self .ti_standard , Position = Position (PointF (412 , 16 )), TabOrder = 14 )
213- self .pnl .Size .SetProps (Size = SizeF (138 , 145 ), PlatformDefault = False )
215+ # self.pnl.Size.SetProps(Size = SizeF(138, 145), PlatformDefault = False)
214216
215217 self .lb_panel .SetProps (Parent = self .pnl , Position = Position (PointF (21 , 7 )), Text = "Panel" )
216- self .lb_panel .Size .SetProps (Size = SizeF (94 , 22 ), PlatformDefault = False )
218+ # self.lb_panel.Size.SetProps(Size = SizeF(94, 22), PlatformDefault = False)
217219 self .lb_panel .TextSettings .HorzAlign = "Center"
218220
219221 self .btn_panel_1 .SetProps (Parent = self .pnl , Position = Position (PointF (26 , 43 )), Text = "SpeedButton" )
220- self .btn_panel_1 .Size .SetProps (Size = SizeF (85 , 25 ), PlatformDefault = False )
222+ # self.btn_panel_1.Size.SetProps(Size = SizeF(85, 25), PlatformDefault = False)
221223
222224 self .btn_panel_2 .SetProps (Parent = self .pnl , Position = Position (PointF (26 , 83 )), Text = "SpeedButton" )
223- self .btn_panel_2 .Size .SetProps (Size = SizeF (85 , 25 ), PlatformDefault = False )
225+ # self.btn_panel_2.Size.SetProps(Size = SizeF(85, 25), PlatformDefault = False)
224226
225227 self .ssb .SetProps (Parent = self .ti_standard , Position = Position (PointF (243 , 79 )), TabOrder = 15 , ViewportSize = 33 , SmallChange = 0 , Orientation = "Vertical" )
226- self .ssb .Size .SetProps (Size = SizeF (8 , 150 ), PlatformDefault = False )
228+ # self.ssb.Size.SetProps(Size = SizeF(8, 150), PlatformDefault = False)
227229
228230 self .cb_multi_select .SetProps (Parent = self .ti_standard , Position = Position (PointF (272 , 212 )), TabOrder = 16 , Text = "MultiSelect" )
229- self .cb_multi_select .Size .SetProps (Size = SizeF (120 , 19 ), PlatformDefault = False )
231+ # self.cb_multi_select.Size.SetProps(Size = SizeF(120, 19), PlatformDefault = False)
230232 self .cb_multi_select .SetProps (OnChange = self .__on_change_cb_multi_select )
231233
232234 self .cp .SetProps (Parent = self .ti_standard , Position = Position (PointF (412 , 185 )), TabOrder = 17 , CalloutWidth = 23 , CalloutLength = 11 , CalloutPosition = "Right" )
233- self .cp .Size .SetProps (Size = SizeF (169 , 124 ), PlatformDefault = False )
235+ # self.cp.Size.SetProps(Size = SizeF(169, 124), PlatformDefault = False)
234236
235237 self .lbl_cp .SetProps (Parent = self .cp , Text = "CalloutPanel" , Align = "Center" )
236- self .lbl_cp .Size .SetProps (Size = SizeF (97 , 22 ), PlatformDefault = False )
238+ # self.lbl_cp.Size.SetProps(Size = SizeF(97, 22), PlatformDefault = False)
237239 self .lbl_cp .TextSettings .SetProps (HorzAlign = "Center" )
238240
239241 self .callout_right .SetProps (Parent = self .cp , Position = Position (PointF (127 , 56 )), GroupName = "1" , IsChecked = True , OnChange = self .__on_co_btn_change )
240- self .callout_right .Size .SetProps (Size = SizeF (19 , 19 ), PlatformDefault = False )
242+ # self.callout_right.Size.SetProps(Size = SizeF(19, 19), PlatformDefault = False)
241243
242244 self .callout_top .SetProps (Parent = self .cp , Position = Position (PointF (74 , 18 )), GroupName = "1" , IsChecked = False , OnChange = self .__on_co_btn_change )
243- self .callout_top .Size .SetProps (Size = SizeF (19 , 19 ), PlatformDefault = False )
245+ # self.callout_top.Size.SetProps(Size = SizeF(19, 19), PlatformDefault = False)
244246
245247 self .callout_left .SetProps (Parent = self .cp , Position = Position (PointF (15 , 58 )), GroupName = "1" , IsChecked = False , OnChange = self .__on_co_btn_change )
246- self .callout_left .Size .SetProps (Size = SizeF (19 , 19 ), PlatformDefault = False )
248+ # self.callout_left.Size.SetProps(Size = SizeF(19, 19), PlatformDefault = False)
247249
248250 self .callout_bottom .SetProps (Parent = self .cp , Position = Position (PointF (74 , 86 )), GroupName = "1" , IsChecked = False , OnChange = self .__on_co_btn_change )
249- self .callout_bottom .Size .SetProps (Size = SizeF (19 , 19 ), PlatformDefault = False )
251+ # self.callout_bottom.Size.SetProps(Size = SizeF(19, 19), PlatformDefault = False)
250252
251253 self .tb .SetProps (Parent = self .ti_standard , Position = Position (PointF (16 , 174 )), TabOrder = 18 , Orientation = "Horizontal" , CanParentFocus = True , Value = 33 )
252- self .tb .Size .SetProps (Size = SizeF (179 , 19 ), PlatformDefault = False )
254+ # self.tb.Size.SetProps(Size = SizeF(179, 19), PlatformDefault = False)
253255
254256 self .lbl_tb .SetProps (Parent = self .ti_standard , Position = Position (PointF (16 , 232 )), TabOrder = 19 )
255- self .tb .Size .SetProps (Size = SizeF (120 , 15 ), PlatformDefault = False )
257+ # self.tb.Size.SetProps(Size = SizeF(120, 15), PlatformDefault = False)
256258
257259 def __init_comps (self ):
258260 self .__on_lo_control_resize (self .lo_control )
0 commit comments