locked
TRYING MY HANDS ON MAKING RIBBON FOR FUTURE PROJECT RRS feed

  • Question

  • I Want to try building ribbon menu on top of my programs anyone got an idea where to learn or get a sample of it to edit ?
    Tuesday, August 6, 2019 3:02 AM

Answers

  • Hi Rai_Ohki,

    this strongly depends on your VFP knowledge. If you haven't used OOP yet, then it might be an awful task for you and it would be better to use one of the available classes.

    One option would be the ThemedControls by Emerson Reed

    https://github.com/VFPX/ThemedControls

    A second classlib would be FoxRibbon by the late Guillermo Carrero

    https://sites.google.com/site/foxribbonclass/home

    A third one comes from Yousfi Benameur

    http://yousfi.over-blog.com/2017/05/easy-custom-ribbons.html

    and several others that you might have to pay for....

    Basically each of them is based on a pageframe with deaktivated tabs. VFPs tabs in pageframes cannot be as much manipulated (optically) as it has to be to get an acceptable look. Instead of the pageframe tabs sometimes containerclasses with images and labels or commandgroups are used for this and a click on one of the objects activates the corresponding pageframe.page.

    All this can be done rather easily. As always, the difficult part comes with the details. i.e. reactions on width changes of the form, office like tooltips, professional images, foldable ribbons, subwindows, shortcut ribbons, a.s.o. and we come back to my first sentence :)

    So, even if you have lots of OOP knowledge it will be helpful to have a look, at how other developers approached this. So, get yourself one or more of the above mentioned classes and dive into their code.

    This picture below shows one of our ribbon classes, originally based on Emersons ThemedControls and meanwhile being modified by me for win10.

    JM2C


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011




    • Edited by Tom BorgmannEditor Tuesday, August 6, 2019 6:33 AM typos
    • Marked as answer by Rai_Ohki Tuesday, August 6, 2019 11:10 PM
    Tuesday, August 6, 2019 6:28 AM
    Answerer

All replies

  • Hi Rai_Ohki,

    this strongly depends on your VFP knowledge. If you haven't used OOP yet, then it might be an awful task for you and it would be better to use one of the available classes.

    One option would be the ThemedControls by Emerson Reed

    https://github.com/VFPX/ThemedControls

    A second classlib would be FoxRibbon by the late Guillermo Carrero

    https://sites.google.com/site/foxribbonclass/home

    A third one comes from Yousfi Benameur

    http://yousfi.over-blog.com/2017/05/easy-custom-ribbons.html

    and several others that you might have to pay for....

    Basically each of them is based on a pageframe with deaktivated tabs. VFPs tabs in pageframes cannot be as much manipulated (optically) as it has to be to get an acceptable look. Instead of the pageframe tabs sometimes containerclasses with images and labels or commandgroups are used for this and a click on one of the objects activates the corresponding pageframe.page.

    All this can be done rather easily. As always, the difficult part comes with the details. i.e. reactions on width changes of the form, office like tooltips, professional images, foldable ribbons, subwindows, shortcut ribbons, a.s.o. and we come back to my first sentence :)

    So, even if you have lots of OOP knowledge it will be helpful to have a look, at how other developers approached this. So, get yourself one or more of the above mentioned classes and dive into their code.

    This picture below shows one of our ribbon classes, originally based on Emersons ThemedControls and meanwhile being modified by me for win10.

    JM2C


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011




    • Edited by Tom BorgmannEditor Tuesday, August 6, 2019 6:33 AM typos
    • Marked as answer by Rai_Ohki Tuesday, August 6, 2019 11:10 PM
    Tuesday, August 6, 2019 6:28 AM
    Answerer
  • Tom,

    That is a very apealing UI, Emerson's class in Office365 skin. Very nice. The original skin, Outlook2013, looks outdated already now 5 years old, can you imagine?

    Would you mind to share that with us?

    Regards,

    Koen


    Pensionado, VFP programer


    • Edited by Koen-P Tuesday, August 6, 2019 12:31 PM
    Tuesday, August 6, 2019 12:31 PM
  • Hi Koen,

    ty, I like that theme, too :)

    I wish I could share it, but it is so much integrated in our classes that I would have to rewrite it to make it stand alone again.

    What I did was a ~75% rewriting of Emerson's original code. It started because of all the office pics that are used for the different office color themes. As our software is server based and several of our big customers make use of server farms AND Linux fileservers we simply had to rewrite a lot of code to optimize our apps.

    Also the tooltip class needed an intensive workover, as our customers use 2 or more displays at once and the original tooltip fired C0000xxxxx errors because of wrong computed offsets.

    I also added 3 (or 4, can't remember anymore) builders and rewrote the existing builders as we automated many more things than Emerson had in mind at that time. Mostly because of our several different form types. For example all the builders have direct access to our development servers for reading pre-configurations. They also include multilanguage support, help ID, internal eventhandler definitions, button positioning and so much more.

    I am pretty sure, that those redesigned classes are found useful by many developers. But with their current implementation, I can't make them public. Sorry.


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011


    Tuesday, August 6, 2019 1:01 PM
    Answerer
  • Tom.

     crystal clear answer.

    Regards,

    Koen


    Pensionado, VFP programer

    Tuesday, August 6, 2019 10:00 PM
  • Thank you sir tom a very informative answer. I just started vf9 last 2-3 months ago and I've been learning a lot and want to learn more complex designs.
    • Edited by Rai_Ohki Tuesday, August 6, 2019 11:12 PM
    Tuesday, August 6, 2019 11:12 PM
  • also wanted to try OOP but i can't find it to download the sites makes an error.
    Tuesday, August 6, 2019 11:22 PM
  • Hi,

    What are you looking for to download?  OOP is a way of programming. There is nothing to download in my opinion.

    Koen


    Pensionado, VFP programer

    Wednesday, August 7, 2019 9:45 AM
  • Oh yeah object oriented programming . Sorry i don't know the Acronym for it. I get it now thx
    Wednesday, August 7, 2019 11:16 PM