-
Is it possible to add an editbox to a toolbar - and to have it inline between buttons? This is what I am trying:
program Test;
uses KOL;
var ToolBar, EditBox: PControl;
begin
Applet := NewForm(nil, 'Toolbar');
Toolbar := NewToolbar(Applet, caTop, [], 0, ['111', '222'], [-2]);
EditBox := NewEditbox(ToolBar, []); ToolBar.TBAddButtons(['333', '444'], [-2, -2]);
Run(Applet);
end.
Any suggestions please?
-
program Test;
uses KOL;
var ToolBar, EditBox: PControl;
begin
Applet := NewForm(nil, 'Toolbar');
Toolbar := NewToolbar(Applet, caTop, [], 0, ['111', '222', '-'], [-2]);
EditBox := NewEditbox(ToolBar, []);
ToolBar.TBAddButtons(['333', '444'], [-2, -2]);
ToolBar.TBButtonWidth[2] := EditBox.Width;
EditBox.BoundsRect := ToolBar.TBButtonRect[2];
Run(Applet);
end.
-
Thank you Дмитрий К
|