Mida Converter

Please login or register.

Login with username, password and session length
Advanced search  

News:

8 July 2012 - New server and new Forum !

Author Topic: Styles?  (Read 16911 times)

thetoolwiz

  • Newbie
  • *
  • Posts: 7
    • View Profile
Styles?
« on: July 07, 2013, 02:37:31 am »

In order that you don't simply point me to the page that states this, I'll save you the trouble and paste it here to show you that I actually found it and read it:

StyleBook
 
The VCL framework includes style information such as fonts, TPanels, and backgrounds in each component. For example a TLabel would include the font size, name, and color. The FireMonkey framework uses a Stylebook technique where all component style information for a form is contained in a stylebook for that form rather than in each component.

Mida 3 seamlessly and automatically moves the VCL style information into the new FireMonkey stylebook on each form saving you from having to manually cut and paste this information from each component. A real time saver!


The way I interpret the paragraph above is that if I have things like Panel1.Color then it will be converted into whatever FM needs to set the color.  In fact, Panel1.Color, Panel1.Top, Panel1.Left are all left untouched and uncommented ... and they don't work in FM.

The video that Marco made last year shows him converting lots of controls that he said require very little work, and he was using the free version. He said Mida will leave comments for things that it cannot convert.  I have the Pro version, and it's not converting basic things like this, nor is it leaving any comments around common properties that it cannot convert.

Do I need the Studio version to get it to do these conversions?

Note: this is a vanilla TPanel on a TForm, a very very simple test.

I'm using V3.2 (the latest one) and I have all of the default settings checked, including the one that say TStyles (or something similar).

-David
Logged

MauroBotta

  • Titolo
  • Administrator
  • Jr. Member
  • *****
  • Posts: 97
  • Mida Converter - Official Forum
    • View Profile
Re: Styles?
« Reply #1 on: July 11, 2013, 12:02:46 am »

Hi David

>> I have the Pro version, and it's not converting basic things like this, nor is it leaving any comments around common properties that it cannot convert.

Send an example of  Pas+DFM with your problem at info@midaconverter.com, in short time, we will examine the problem and contact you.
Logged

thetoolwiz

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Styles?
« Reply #2 on: July 13, 2013, 07:51:28 am »

I came up with a work-around for the Style issues that's actually more useful for other purposes.

Instead of rewriting the properties that have changed, why don't you just include helper classes?

I created one for TPanel to address these properties, and it works like a charm:

  • .Color
  • .Top
  • .Left

-David
Logged

MauroBotta

  • Titolo
  • Administrator
  • Jr. Member
  • *****
  • Posts: 97
  • Mida Converter - Official Forum
    • View Profile
Re: Styles?
« Reply #3 on: July 17, 2013, 12:53:37 am »

Hi David

Mida automatically converts TPanel Top / Left coordinates in the new .Positions system of FMX.

Mida Pro / Studio, converts, the colors , for example updated MyPanel.color->clRed becomes claRed (inside a new StyleBook linked to Tpanel )



Your source behaves differently?
Logged