GeekArticles
Programming
Delphi
Programming
DelphiImpossible to add buttons to TToolBar using customization dialog
QC#: 2087 Version: 6.0 Status: Closed defect, no action required Resolution: Bug has been fixed Description: TToolBar component supports customization via a dialog that is called by double clicking on the toolbar. When that dialog appears, the application can add buttons to the 'Available' list using OnCustomizeNewButton event. However, if the user attempts to actually add any button other than a separator from the 'Available' list - nothing happens, because that operation is blocked in ComCtrls.pas:
procedure TToolBar.CNNotify(var Message: TWMNotify);
...
TBN_QUERYINSERT:
with PNMToolbar(NMHdr)^ do
begin
Result := Integer(DoQueryInsert(iItem));
if (FButtons.IndexOf(Pointer(tbButton.dwData)) < 0)
and (TControl(tbButton.dwData) is TToolButton) then
begin
{ FButtons.Insert(iItem, Pointer(tbButton.dwData));
TToolButton(tbButton.dwData).FToolbar := Self;
if Assigned(FOnCustomizeAdded) then
FOnCustomizeAdded(Self, TToolButton(tbButton.dwData));}
end else
if (tbButton.dwD...
procedure TToolBar.CNNotify(var Message: TWMNotify);
...
TBN_QUERYINSERT:
with PNMToolbar(NMHdr)^ do
begin
Result := Integer(DoQueryInsert(iItem));
if (FButtons.IndexOf(Pointer(tbButton.dwData)) < 0)
and (TControl(tbButton.dwData) is TToolButton) then
begin
{ FButtons.Insert(iItem, Pointer(tbButton.dwData));
TToolButton(tbButton.dwData).FToolbar := Self;
if Assigned(FOnCustomizeAdded) then
FOnCustomizeAdded(Self, TToolButton(tbButton.dwData));}
end else
if (tbButton.dwD...
Sponsored Links
Related Topics
Subscribe via RSS
Delphi
- A load of ASP.NET related tutorials, articles, tips and tricks!
- How to move PageControl's tabs using drag'n'drop
- Charts in database applications
- Creating Components Dynamically (at Run-Time)
- The role of the "AOwner" parameter in the Create constructor
- Creating a roll up form (with animation)
- Poll: Do you already have some experience with Delphi?
- Creating a database from Delphi code
- TMemoBar - T(Custom)Memo extender
- How to click-and-select a line in TMemo
