Home » U++ Library support » Menus&Toolbars » EditString in toolbar doesn't work
|
Re: EditString in toolbar doesn't work [message #3334 is a reply to message #3329] |
Sat, 20 May 2006 21:02 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
forlano wrote on Sat, 20 May 2006 08:23 | Hello,
in my toolbar I've added an editstring. In it I want to show the filename currently in use. I know the status bar is better place for this but I want save space in my page.
First I engaged a terrible struggle with the editstring that appeared microscopic. When I lost the hope I've found a hint on the forum:
bar.Add(edts, edts.AddFrameSize(200,15));
and I won the battle.
But then I lost the war because it refused to adjourn its content. I mean it is unsensitive to the command <<= like in this snippet:
void VegaTab4::Load(const String& name)
{
editor.Set(LoadFile(name));
//edts <<= name; //doesn't work
//edts.SetText(name); //doesn't work
edts <<= "prova"; //doesn't work
editor.ClearModify();
}
So, is it possible to send a string in the editstring embeded in a toolbar?
Luigi
PS: the editstring is seteditable to false, but it doesn't work even it it set to true.
|
This works:
#include <CtrlLib/CtrlLib.h>
struct MyApp : TopWindow {
EditDate date;
ToolBar toolbar;
void Set() {
date <<= GetSysDate();
}
void Tool(Bar& bar) {
bar.Add("Test1", CtrlImg::paste(), THISBACK(Set));
bar.Separator();
bar.Add(date, 300);
}
typedef MyApp CLASSNAME;
MyApp() {
AddFrame(toolbar);
toolbar.Set(THISBACK(Tool));
Sizeable();
}
};
GUI_APP_MAIN
{
MyApp().Run();
}
Mirek
|
|
|
Goto Forum:
Current Time: Fri Apr 26 10:57:54 CEST 2024
Total time taken to generate the page: 0.06512 seconds
|