RB10: Is the way to change datapipelines captions in toolbar?
Hello!
I'm know my next question is specific and difficult but if you can help me,
I'm nake happy :-)
I'm use ReportBuilder since 3.51 version and use own algorithm of
replacement dadapipelines captions on combobox of Edit toolbar, i.e. -
I'm don't want to show delphi component names or UserName (- it is like
delphi identifier!) od datapipelines like "DataPipeline1".
I'm show full names of my queries in this combobox on my native language
(russian) - with spaces and any words :-)
From ver 3.51 to 9 I'm hook windows message in designer.OnActivate event:
var CBox : TComboBox;
FEditBar := TppEditToolbar(P.ToolbarManager.FindToolbar('Edit'));
CBox := FEditBar.ComboBox;
SaveWndProc := CBox.WindowProc;
CBox.WindowProc := CBoxHook;
...
procedure TfrmMain.CBoxHook(var Message: TMessage);
begin
SaveWndProc(Message);
// ItemIndex
if Message.Msg = CB_SETCURSEL then ReplaceData(CBox);
end;
This code work fine, but in RB10 Toolbar upgrade to TBX toolbars and Combox
now not is TWinControl :-(
I'm try to work with FEditBar.ComboBox2 with events (OnChange, OnSelect...)
(FEditBar :=
TppEditToolbar(lLayoutManager.ToolManager.Toolbars.ItemsByName['Edit']);)
- but without any effect....
Is the way to replace datapipelines names in Edit toolbar combobox?
Nikolai
I'm know my next question is specific and difficult but if you can help me,
I'm nake happy :-)
I'm use ReportBuilder since 3.51 version and use own algorithm of
replacement dadapipelines captions on combobox of Edit toolbar, i.e. -
I'm don't want to show delphi component names or UserName (- it is like
delphi identifier!) od datapipelines like "DataPipeline1".
I'm show full names of my queries in this combobox on my native language
(russian) - with spaces and any words :-)
From ver 3.51 to 9 I'm hook windows message in designer.OnActivate event:
var CBox : TComboBox;
FEditBar := TppEditToolbar(P.ToolbarManager.FindToolbar('Edit'));
CBox := FEditBar.ComboBox;
SaveWndProc := CBox.WindowProc;
CBox.WindowProc := CBoxHook;
...
procedure TfrmMain.CBoxHook(var Message: TMessage);
begin
SaveWndProc(Message);
// ItemIndex
if Message.Msg = CB_SETCURSEL then ReplaceData(CBox);
end;
This code work fine, but in RB10 Toolbar upgrade to TBX toolbars and Combox
now not is TWinControl :-(
I'm try to work with FEditBar.ComboBox2 with events (OnChange, OnSelect...)
(FEditBar :=
TppEditToolbar(lLayoutManager.ToolManager.Toolbars.ItemsByName['Edit']);)
- but without any effect....
Is the way to replace datapipelines names in Edit toolbar combobox?
Nikolai
This discussion has been closed.
Comments
For RB 10.x, we introduced a completely new toolbar and menu architecture to
utilize Toolbar 2000 and TBX. Take a look at the following example on how
to access and alter the new toolbars and menus. This should get you on the
right track.
http://www.digital-metaphors.com/tips/Designer10_CustomizeMenusAndToolbars.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com