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

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -