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 » LineEdit, EditFields, DocEdit » How applying syntax, for example c++?
Re: How applying syntax, for example c++? [message #48784 is a reply to message #48781] Mon, 18 September 2017 11:56 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
#include <CtrlLib/CtrlLib.h>
#include <CodeEditor/CodeEditor.h>

using namespace Upp;

struct MyAppWindow : TopWindow {
	Button button;
	CodeEditor ed;

	void Click() { PromptOK("You have clicked the button!"); }

	typedef MyAppWindow CLASSNAME;

	MyAppWindow() {
		Title("My application with button");
		Add(ed.LeftPos(10, 200).TopPos(10, 200));
		button.SetLabel("Click me!");
		button <<= THISBACK(Click);
		
		ed.Highlight("cpp");
	}
};

GUI_APP_MAIN
{
	MyAppWindow app;
	app.Run();
}
 
Read Message
Read Message
Previous Topic: an easy way for EditDoubleNotNull to use 0 as def?
Next Topic: LineEdit how to set selection from code
Goto Forum:
  


Current Time: Fri Apr 26 22:58:36 CEST 2024

Total time taken to generate the page: 0.94178 seconds