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

Move custom button on preview toolbar

edited May 2007 in General
Hi,
I have created a custom button on the preview form now. I want to move it
from the last position to the second position; next to the print button.
This is my code:

NewButton := Toolbar.AddButton;
ButtonIndex := Toolbar.Items.IndexOf(NewButton);
NewButton.Move(ButtonIndex, 1);

I got the message "Toolbar item index out of range". ButtonIndex is 22 but
the Toolbar only have 12 visible items.
How can I move the button to a other position?

Comments

  • edited May 2007
    Hi Sven,

    For the new toolbars, you will need to recreate the entire toolbar if you
    would like to add your own items inside the others. For instance, you can
    copy and paste the existing code in the CreateToolbarItems routine into your
    overridden one and alter it however you need. Be sure to remove the
    inherited call.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.