PBEdit - a Canvas-based Texteditor

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PBEdit - a Canvas-based Texteditor

Post by ChrisR »

Thanks for the update Mr.L :)
2 little things seen:
. On the vertical scroll bar, if I select the cursor and move up (or right) and left at the same time, diagonally, the scrolling stops and we return to the starting position.
. If positioned on an empty indented line and I select the left part by going to the line number, in order to delete the line, the previous or next line is automatically selected.
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: PBEdit - a Canvas-based Texteditor

Post by Mr.L »

Hello ChrisR and thanks for the reply.
ChrisR wrote: Mon Jan 23, 2023 7:29 pm On the vertical scroll bar, if I select the cursor and move up (or right) and left at the same time, diagonally, the scrolling stops and we return to the starting position.
Isn't that the exact behaviour of the scrollbar in the PureBasic IDE? When im scrolling and move away too far from the scrollbar, the scrolling is canceled.
ChrisR wrote: Mon Jan 23, 2023 7:29 pm If positioned on an empty indented line and I select the left part by going to the line number, in order to delete the line, the previous or next line is automatically selected.
I guess i see what you mean. I have changed the mouse selection to mimic more the selection in the IDE.

you can give it a try:
https://github.com/zzippyy/PBEdit
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PBEdit - a Canvas-based Texteditor

Post by ChrisR »

Hello Mr.L
Mr.L wrote: Mon Jan 23, 2023 10:02 pm Isn't that the exact behaviour of the scrollbar in the PureBasic IDE? When im scrolling and move away too far from the scrollbar, the scrolling is canceled.
Yes, that's right, I hadn't noticed.
Mr.L wrote: Mon Jan 23, 2023 10:02 pm I guess i see what you mean. I have changed the mouse selection to mimic more the selection in the IDE.
Perfect, the mouse selection related issue is fixed, thanks :)

Your editor is really great, keep up the good work 8)
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PBEdit - a Canvas-based Texteditor

Post by ChrisR »

I used PBEdit, with your latest improvements on GitHub, the last 2 days to code and I enjoyed, it's really a great Canvas-based Texteditor.
I only missed the option for saving, the side panels of the procedures and of course the compiler and integrated debugger. I hope, they will come one day with a little start of IDE.
I would be unable to produce such piece of code so nicely written, I have much to learn.
Just my 2 cts to wake up possible future testers :wink:
AZJIO
Addict
Addict
Posts: 1318
Joined: Sun May 14, 2017 1:48 am

Re: PBEdit - a Canvas-based Texteditor

Post by AZJIO »

Can this module be made for SpiderBasic?
Webarion
New User
New User
Posts: 6
Joined: Tue Sep 14, 2021 8:50 pm

Re: PBEdit - a Canvas-based Texteditor

Post by Webarion »

AZJIO wrote: Sat Jan 28, 2023 4:43 am Can this module be made for SpiderBasic?
I think this module will be heavy for SpiderBasic.
For SB and Web, there is a good AceEditor editor:
https://github.com/spiderbytes/AceEditor
https://ace.c9.io/
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: PBEdit - a Canvas-based Texteditor

Post by Mr.L »

ChrisR wrote: Fri Jan 27, 2023 7:49 pm I only missed the option for saving, the side panels of the procedures and of course the compiler and integrated debugger. I hope, they will come one day with a little start of IDE.
I'm sorry to say, but I'm not planning to write a new IDE :wink:
Well, I tried once, but it is really hard and not worth the afford (for me at least).
AZJIO wrote: Sat Jan 28, 2023 4:43 am Can this module be made for SpiderBasic?
It would be really nice, if it would be possible, without rewriting the whole code.
I don't have SpiderBasic so I can't say, but I guess it's not working.
SeregaZ
Enthusiast
Enthusiast
Posts: 617
Joined: Fri Feb 20, 2009 9:24 am
Location: Almaty (Kazakhstan. not Borat, but Triple G)
Contact:

Re: PBEdit - a Canvas-based Texteditor

Post by SeregaZ »

Can this PBEdit do column, as Excel can? I need 3 columns - string numbers as here, marks (short column), code as here.
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: PBEdit - a Canvas-based Texteditor

Post by Mr.L »

You can use Tab to allign rows of text but I guess that is not what you have in mind.
So, no. It's really just a Texteditor and has no cell support.
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: PBEdit - a Canvas-based Texteditor

Post by drgolf »

Hello,

Very good code editor.

How can i detect any change in the editor (text modification) ?
And also can i remove the modify flag if exist ?
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: PBEdit - a Canvas-based Texteditor

Post by Mr.L »

drgolf wrote: Wed Jul 12, 2023 9:03 am How can i detect any change in the editor (text modification) ?
And also can i remove the modify flag if exist ?
Hello, drgolf!
I'm glad you like my editor :D

In the latest version (1.14) I have added a feature to show changed lines. They are indicated by an orange line at the beginning of the textline.
Internally, when a textline has been modified, the flag '#TE_TextLine_Modified' is set inside the TE_TEXTLINE\flags.
To remove this flags you can call the Function PBEdit_ClearModifyFlags(ID).

https://github.com/MR-L-PB/PBEdit/tree/main
(Don't forget to download the files inside the "styles" and "lang" folder aswell)
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: PBEdit - a Canvas-based Texteditor

Post by drgolf »

Hello,

I have implemented 2 fonctions (getmodify and setmodify) for my use.

I have download the last version 1.14.
Some glitch on resize window with split view.

The component is very nice. Thanx.

Have a good day and continue enhance PBEdit.
User avatar
❤x1
User
User
Posts: 46
Joined: Thu Jan 10, 2019 5:56 pm

Re: PBEdit - a Canvas-based Texteditor

Post by ❤x1 »

Hello,
PBEdit looks super impressive, but I'm puzzled: how are we supposed to use the auto-completion/indentation on Windows?
There is no KeyDown event for Tab, since the key cycles through every gadget on the window.
Mr.L
Enthusiast
Enthusiast
Posts: 104
Joined: Sun Oct 09, 2011 7:39 am

Re: PBEdit - a Canvas-based Texteditor

Post by Mr.L »

Hi, ❤x1
Unfortunately, since the latest updates, the Tab-key detection for the canvas gadet doesn't work anymore.
I just saw, that you already have written a bug report.
Post Reply