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++?
How applying syntax, for example c++? [message #48781] Sun, 17 September 2017 23:36 Go to previous message
AndrzejB is currently offline  AndrzejB
Messages: 2
Registered: September 2017
Junior Member
I am newbie in Ultimate++.
I am using CodeEditor class, No syntax highlighting and auto indent. How say CodeEditor that my syntax is c++ or other?
My first program:
#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);
	}
};

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: Thu Apr 18 21:27:30 CEST 2024

Total time taken to generate the page: 3.02375 seconds