Search code examples
delphidelphi-2009vclribbon

how can i hide TRibbon pages?


i'm using delphi 2009's TRibbon component. certain pages are not relevant depending on the application state. how can i hide a TRibbon page?

RibbonPage1.Visible:=false doesn't really hide the page...

is this maybe not allowed by the spec from microsoft?

thank you for you help! mp


Solution

  • I do not think you can hide the individual ribbon pages, but you can hide or disable the individual RibbonGroups on the each page.

    RibbonGroup1.Enabled := false; 
    RibbonGroup2.Visible := false;
    

    Microsoft Office disables any groups which are not relevant to the current state. Have a look at these articles from the documentation for more help.