Tech Tutorials Database
GeekArticles Programming Delphi
 

Impossible to add buttons to TToolBar using customization dialog

 
Author: qc.borland.com
Category: Delphi
Comments (0)

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...

Read More...




Sponsored Links




Read Next: A way to set both Width and Height of TBitmap (speed reason)



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe