Monday, April 30, 2012

TRibbon.MoveGroup Method Parameters

Yesterday, I was working on a program which have several editions. I created the application ribbon bar at design time, but in one of the editions I had to combine two of the ribbon pages. so I tried to move all of the ribbon groups from one ribbon page to another using the TRibbon.MoveGroup method.

I was completely, unsuccessful as I always passed the name of the source group and the target page as the parameters. The method definition is this: 

void __fastcall MoveGroup(const System::UnicodeString GroupName, const System::UnicodeString PageName);

I realized that the parameters should be the Caption (not the name) of the moving ribbon group and the target ribbon page. This way the method works charmingly :) 



No comments:

Post a Comment