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

Custom button in RB Designer

edited January 2002 in General
Hello!

Is it possible to add my custom button to standard toolbar
of ReportBuilder designer?

Thanks,
Nikolai Bochkarev

Comments

  • edited January 2002
    There is an example (the Checkbox sample component), in your installed
    ..\RBuilder\Demos\RCL\myChkBox.pas

    Here's the ppRegisterComponent() code you'll be looking for:

    initialization

    {register the component, the parameters are:

    Component Class Name, class name of component
    Toolbar Name, name of Toolbar on which component should
    appear
    Position, position of component on toolbar
    HintIndex, (used by the built-in ReportBuilder components)
    Loads the Language string
    of the specified index as the hint
    Hint, Hint text which appears when mouse is
    positioned over component on Toolbar
    HInstance, Handle of library for this unit, needed to load
    bitmap from resource file}

    ppRegisterComponent(TmyCheckBox, 'Standard Components', 10, 0, 'CheckBox',
    HInstance);
    ppRegisterComponent(TmyDBCheckBox, 'Data Components', 10, 0, 'DBCheckBox',
    HInstance);

    raRegisterRTTI(TraTmyCustomCheckBoxRTTI);
    raRegisterRTTI(TraTmyCheckBoxRTTI);
    raRegisterEnum('TmyCheckStyleType', TypeInfo(TmyCheckStyleType));


    finalization

    ppUnRegisterComponent(TmyCheckBox);
    ppUnRegisterComponent(TmyDBCheckBox);

    raUnRegisterRTTI(TraTmyCustomCheckBoxRTTI);
    raUnRegisterRTTI(TraTmyCheckBoxRTTI);
    raUnRegisterEnum('TmyCheckStyleType');



    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2002
    > "Nikolay" wrote in message

    Sorry, but I meant another: how to insert the button
    with my OnClick event (not component!!!) on stanard report designer toolbar?

    I want to add button with "select font" dialog call.

    Thanks,
    Nikolay.
This discussion has been closed.