Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Menus&Toolbars » EditString in toolbar doesn't work
EditString in toolbar doesn't work [message #3329] Sat, 20 May 2006 14:23 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
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.
index.php?t=getfile&id=146&private=0
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.
  • Attachment: s.jpg
    (Size: 9.14KB, Downloaded 2468 times)

[Updated on: Sat, 20 May 2006 14:25]

Report message to a moderator

Re: EditString in toolbar doesn't work [message #3334 is a reply to message #3329] Sat, 20 May 2006 21:02 Go to previous message
mirek is currently offline  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.
index.php?t=getfile&id=146&private=0
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
Previous Topic: Menu, SubMenu and Icons [ADDED]
Next Topic: menu items in bar stays for a while...
Goto Forum:
  


Current Time: Fri Mar 29 06:06:13 CET 2024

Total time taken to generate the page: 0.01068 seconds