how to hide optionsmenu from TCRDBGrid

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lyan
Posts: 3
Joined: Fri 20 Apr 2007 04:59

how to hide optionsmenu from TCRDBGrid

Post by lyan » Fri 20 Apr 2007 05:03

Sorry, this is not directly related to this group, but don't know where to post.

I am using TCRDBGrid, can i hide the options menu? if yes, how?

Thanks,
Lai Fu Yan

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 24 Apr 2007 07:14

There is no options in TCRDBGrid to hide options menu.
You can assign your own popup menu using the TCRDBGrid.OptionsMenu property, or correct TCRDBGrid code manually:
Open the CRGrid.pas unit and find:

Code: Select all

procedure TCRDBGrid.IndicatorClick(Button: TIndicatorColButton; X, Y: integer);
Then comment next lines:

Code: Select all

     else
        FOptionsMenuDef.Popup(P.x, P.y);

Post Reply