dbf_usr Posted March 28, 2019 Share Posted March 28, 2019 for i := 0 to ComponentCount-1 do if Components[i] is TEdit then (Components[i] as TEdit).Color := clRed; Вот такой код работает в VCL приложениях. В UniGUI не нащел ни у форм ни у фреймов свойств Componets. За ранее не известно сколько элементов на форме, нужно обойти все. Как это сделать? Quote Link to comment Share on other sites More sharing options...
Volk65 Posted March 29, 2019 Share Posted March 29, 2019 Попробуйте ControlCount и Controls Quote Link to comment Share on other sites More sharing options...
=GGG= Posted March 29, 2019 Share Posted March 29, 2019 19 hours ago, dbf_usr said: for i := 0 to ComponentCount-1 do if Components[i] is TEdit then (Components[i] as TEdit).Color := clRed; Вот такой код работает в VCL приложениях. В UniGUI не нащел ни у форм ни у фреймов свойств Componets. За ранее не известно сколько элементов на форме, нужно обойти все. Как это сделать? uses uniGUIForm, uniGUIFrame for z := 0 to AForm.ComponentCount - 1 do AForm.Components[z] for z := 0 to AFrame.ComponentCount - 1 do AFrame.Components[z] Пробовал у себя работает Quote Link to comment Share on other sites More sharing options...
stas Posted March 29, 2019 Share Posted March 29, 2019 Это в принципе не может не работать , все контролы наследники tcomponent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.