delphi - how to change the color of 3D firemonkey objects from different thread -
i have cylinder
cylinder1 : tcylinder; and want change colour when click on it. i've added on click event
procedure tfrmfiremonkey.cylinder1click(sender: tobject); begin cylinder1.materialsource := greenmaterial; end; the cylinder not change colour. change colour if set cylinder1.materialsource before call form.show event
i suspect reason not showing because cylinder1click happening in different thread.
i have discovered that
procedure tfrmfiremonkey.cylinder1click(sender: tobject); begin tcolormaterialsource(cylinder1.materialsource).color := clablue; end; works fine
Comments
Post a Comment