Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Disable Menu and Button ppDesigner

edited November 2005 in End User
I am using this code to disable Menu in RB workspace of my end-user
application

ppDesigEuro.Menu.Items[0].Items[2].Visible := False;

Now I need to disable any button of toolbar (Save, Open an d so on).


Thank You.

Comments

  • edited November 2005

    The toolbars are not created until the window is first shown. Try using the
    Designer.OnActivate event..

    Example

    var
    lDesignerWindow: TppDesignerWindow;
    lToolbar: TppToolbar;
    begin

    if (FFirstTime) then // use a boolean to perform this only once
    begin
    lDesignerWindow := TppDesignerWindow(ppDesigner1.Form);
    lToolbar := lDesignerWindow.ToolbarManager.FindToolbar('Standard');
    lToolbar.Enabled := False;

    FFirstTime := False;
    end;




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.