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 » Community » Newbie corner » Configuring CodeEditor Package
Configuring CodeEditor Package [message #61875] Tue, 02 December 2025 22:08 Go to next message
cayeveh is currently offline  cayeveh
Messages: 3
Registered: December 2025
Junior Member
How do I configure line numbers positioning in the CodeEditor package?
Currently it seems to be left aligned, i want it to be right aligned?


I have this basic code -
include <CtrlLib/CtrlLib.h>  
#include <CodeEditor/CodeEditor.h>

using namespace Upp;  
  /*
INITBLOCK {  
    Ctrl::SetDarkThemeEnabled(false);    
    Ctrl::SetSkin(ChStdSkin);         
}
*/


class Notepad : public TopWindow {  
    CodeEditor editor;  
      
public:  
    Notepad() {  
        Title("Simple Notepad");  
        Add(editor.SizePos());  
          
        editor.LineNumbers(true);  
          
    }  
};  
  
GUI_APP_MAIN  
{  
    Notepad().Run();  
}


---------
Also, i am unable to find documentation for the CodeEditor package.
Re: Configuring CodeEditor Package [message #61876 is a reply to message #61875] Wed, 03 December 2025 08:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14284
Registered: November 2005
Ultimate Member
cayeveh wrote on Tue, 02 December 2025 22:08
How do I configure line numbers positioning in the CodeEditor package?
Currently it seems to be left aligned, i want it to be right aligned?


I have this basic code -
include <CtrlLib/CtrlLib.h>  
#include <CodeEditor/CodeEditor.h>

using namespace Upp;  
  /*
INITBLOCK {  
    Ctrl::SetDarkThemeEnabled(false);    
    Ctrl::SetSkin(ChStdSkin);         
}
*/


class Notepad : public TopWindow {  
    CodeEditor editor;  
      
public:  
    Notepad() {  
        Title("Simple Notepad");  
        Add(editor.SizePos());  
          
        editor.LineNumbers(true);  
          
    }  
};  
  
GUI_APP_MAIN  
{  
    Notepad().Run();  
}


---------
Also, i am unable to find documentation for the CodeEditor package.


Yeah, well, CodeEditor is practically part of TheIDE codebase (meaning it is pretty much specialised for that role) and documentation is lacking here and there in U++, that is sad fact.

I guess you have 2 options: Develop your own CodeEditor or propose a change (ideall a patch) to align numbers right.

Mirek
Re: Configuring CodeEditor Package [message #61877 is a reply to message #61876] Wed, 03 December 2025 08:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14284
Registered: November 2005
Ultimate Member
Ah, now I see that it actually is right-aligned, except CodeEditor leaves a bit more space on the right for various markings as breakpoints.
Re: Configuring CodeEditor Package [message #61878 is a reply to message #61877] Wed, 03 December 2025 09:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14284
Registered: November 2005
Ultimate Member
OK, added CodeEditor::NoAnnotations

Notepad() {
Title("Simple Notepad");
Add(editor.SizePos());

editor.LineNumbers(true);
editor.NoAnnotations();
}

should do what you require (but you neet to use master branch. or nightly build of U++ tomorrow...)
Re: Configuring CodeEditor Package [message #61879 is a reply to message #61878] Wed, 03 December 2025 21:09 Go to previous messageGo to next message
cayeveh is currently offline  cayeveh
Messages: 3
Registered: December 2025
Junior Member
> should do what you require (but you neet to use master branch. or nightly build of U++ tomorrow...)

Thank you for your response. What is the release schedule for U++? Will there be a release before year end?
Re: Configuring CodeEditor Package [message #61880 is a reply to message #61879] Thu, 04 December 2025 08:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14284
Registered: November 2005
Ultimate Member
cayeveh wrote on Wed, 03 December 2025 21:09
> should do what you require (but you neet to use master branch. or nightly build of U++ tomorrow...)

What is the release schedule for U++? Will there be a release before year end?


Unlikely. There might be "announcement" of upcoming release before years end, but it usually takes 1-2 month to release after that. So I guess February/March is realistic.

That said, current nightly is definitely better than the last release Smile
Re: Configuring CodeEditor Package [message #61881 is a reply to message #61880] Thu, 04 December 2025 16:08 Go to previous messageGo to next message
superdev is currently offline  superdev
Messages: 33
Registered: August 2022
Member
mirek wrote on Thu, 04 December 2025 08:52
...
That said, current nightly is definitely better than the last release Smile

Is it usually like this?


Win7x64, upp-win-17799
Re: Configuring CodeEditor Package [message #61882 is a reply to message #61881] Thu, 04 December 2025 16:26 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14284
Registered: November 2005
Ultimate Member
superdev wrote on Thu, 04 December 2025 16:08
mirek wrote on Thu, 04 December 2025 08:52
...
That said, current nightly is definitely better than the last release Smile

Is it usually like this?


95% of time... Frankly, release is just nightly with PR...
Re: Configuring CodeEditor Package [message #61883 is a reply to message #61875] Thu, 04 December 2025 20:00 Go to previous message
cayeveh is currently offline  cayeveh
Messages: 3
Registered: December 2025
Junior Member
Thanks @mirek. Appreciate your help.
Previous Topic: Direct printing to a specific printer
Next Topic: New system of feature requests on our forums- please read and use!
Goto Forum:
  


Current Time: Wed Dec 10 21:00:56 CET 2025

Total time taken to generate the page: 0.09186 seconds