Hello guys

Hello guys,

Does anyone have some tutorial for creating custom components for Firemonkey?
I was a Android/Java programmer, is there something comparing how to create Firemonkey components and Android components?

I want to create something like a custom rendered button :D

Thanks in advance :D

Comments

  1. Eli M You always have amazing tutorials :D :D :D :D :D :D :D :D :D :D :D

    ReplyDelete
  2. You can try http://docwiki.embarcadero.com/RADStudio/XE8/en/Creating_a_FireMonkey_Component_(Delphi)

    but there are some mistakes in the tutorial text. I can't remember all of them but with a little tweaking you can figure out what happens. 

    The style designer (Step 2) doesn't work quite the way the tutorial says. You should be able to get past this by comparing the .FMX files in the tutorial with stuff you're generating. You should also feel free to use layouts, margins, alignments etc. in a way that makes sense to you.

    The tutorial says to remove the TLayout wrapper from the style. For some reason I didn't get that but did end up with a TStyleContainer as the outermost wrapper. I didn't remove it and it seems to work fine.

    GetStyleObject in the tutorial returns a TControl but that has been changed to TFMXObject.

    My SetDoVerb routine ended up using TButton in place of TTextControl. Ditto for GetDoVerb.

    I think most of the difficulties have to do with the tutorial not being updated to keep pace with the changes to Delphi and Firemonkey. You should be able to spot the differences by displaying appropriate declarations.

    The tutorial also contains links to other Firemonkey articles that may be helpful.

    In the final analysis, the tutorial does give you a working Firemonkey component if you make some needed changes and explore things a bit.

    ReplyDelete
  3. Milan Vydareny​ Eli M​ Ooohhh yes :D It is really amazing, thanks a lot guys :D

    ReplyDelete

Post a Comment