I created a style like this:
Then I create a TLayout inherited component named TLieu
My goal is to instantiate it at runtime and change: Image property, Title.Text property, Informations.Text property, Map, Infos, Link buttons
My code, but it's not working:
Procedure TF_Main.Button1Click(Sender: TObject);
var
Lieu: TLieu;
begin
Lieu := TLieu.Create(VSB_Place);
Lieu.Name := 'Test';
Lieu.StyleName := 'Lieu';
Lieu.StylesData['Title.Text'] := 'My Title';
// TLayout(Lieu).StylesData['Title.Text'] := 'My Title'; // this doesn't work either
end;
How can I change the sub properties of a custom user styled component at runtime?