Jump to content
lt.col.blair

Where are my styles?

Recommended Posts

Hi,

I'm pretty new to FMX-Development and just trying to understand styles and how to change them.

I have a small application with two forms and a data module. On the datamodule i placed a stylebook component. The forms have that stylebook assigned in their StyleBook property.

If I open a form in the designer when the DataModule is not open, all contols are displayed without styling. As soon as I open the DataModule, the controls are styled. OK so far.

Some of the controls have their own StyleLookup assigned, e.g. "pnlWait". When I right click on that control and select "Edit user defined style", the style Edtor shows that style for editing:

image.png.b9b8335b6e357fc2bcea0020ac869f32.png

But when I double click the StyleBook, that is placed on the DataSet to edit its styles, it is completely empty!

image.png.0dcca0621341995c763e43b497ce7ab1.png

I could not find any Style settings in the .fmx or .dfm files.

Where are those styles stored?

I'm afraid to lose my styles, if I move my project and forget to take that special file along.

 

Also: I don't understand the difference between "StyleLookup" and "StyleName".  Right now I write the name of my changed styles into "StyleGrouping" and it seems to work, but even though I can copy that style to other controls by writing the name there, I can't select my styles never show up in the selection list ??

I would be glad, if anybody could point me to some tutorials that explain, how styles, style lookup and style name work together and how they get connected to controls. 

 

Thanks,Lutz

 

 

Edited by lt.col.blair
wrong screen shot upload

Share this post


Link to post
19 hours ago, lt.col.blair said:

The forms have that stylebook assigned in their StyleBook property.

Set UseStyleManager to true of StyleBook to avoid this. Note : Only one TStyleBook can be set.

19 hours ago, lt.col.blair said:

I don't understand the difference between "StyleLookup" and "StyleName". 

for exemple :   put a Tpath  and a panel on a form, fill the tpath with some data and set stylename to i.e. 'mytpath'
                      now set panel.stylelookup to 'mytpath'  and you will have your response :classic_smile:image.png.cb34e3de112528a984742664e4a6ae16.png

 

19 hours ago, lt.col.blair said:

But when I double click the StyleBook, that is placed on the DataSet to edit its styles, it is completely empty!

Ok, but did you pay attention to platform ? Have a look at platform 'default' and others if any in stylebook.styles collection
image.thumb.png.fdc3fe77ada09ee12e3cdbf5f3283461.png

 

20 hours ago, lt.col.blair said:

I could not find any Style settings in the .fmx

Ho ! You surely miss it because it's in "binary format"
 

 object StyleBook1: TStyleBook
    Styles = <
      item
        ResourcesBin = {
          464D585F5354594C4520322E350106125370656564427574746F6E315374796C
          653103EA13005450463007544C61796F757400095374796C654E616D65061253...

      }     

 end
      item
        Platform = 'Windows 10 Desktop'
        ResourcesBin = {
          464D585F5354594C4520322E3501060D427574746F6E315374796C6531039B0F
          005450463007544C61796F757400095374796C654E616D65060D427574746F6E

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×