U++ framework
Do not panic. Ask here before giving up.

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: 14290
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: Sun Apr 26 06:35:19 GMT+2 2026

Total time taken to generate the page: 0.00520 seconds