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. За ранее не известно сколько элементов на форме, нужно обойти все. Как это сделать? Link to comment Share on other sites More sharing options...
Volk65 Posted March 29, 2019 Share Posted March 29, 2019 Попробуйте ControlCount и Controls Link to comment Share on other sites More sharing options...
MSMK 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] Пробовал у себя работает Link to comment Share on other sites More sharing options...
stas Posted March 29, 2019 Share Posted March 29, 2019 Это в принципе не может не работать , все контролы наследники tcomponent Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now