custom control : scintilla editor

Share Tips, Code Samples, etc. with the Visual Prolog community.
Post Reply
Gildas Menier
Active Member
Posts: 78
Joined: 8 Jun 2004 23:01

custom control : scintilla editor

Post by Gildas Menier » 28 Oct 2007 18:17

Scintilla (http://www.scintilla.org/) is a text editor with many features such as tooltips, autocompletion, folding, syntax coloring etc...

This custom control wraps the scintilla dll to let you use it to replace the PDC's edit control. It has many more features and let you define your own keyword list, own color set, font, underline, folding etc..

The included project shows how to perform a folding/unfolding as well as syntax coloring for different list of keywords and indentation control. The scintilla control has many more features that can be used and changed at runtime.

Best regards

Gildas

http://www.arsaniit.com/vp_tools/index.htm (look for scintilla control)
Attachments
scintillap.jpg
scintillap.jpg (72.47 KiB) Viewed 11697 times
Last edited by Gildas Menier on 1 Nov 2007 11:04, edited 1 time in total.

drspro2
Active Member
Posts: 116
Joined: 28 Apr 2006 12:03

Post by drspro2 » 29 Oct 2007 11:50

wow really great

User avatar
Thomas Linder Puls
VIP Member
Posts: 2344
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 29 Oct 2007 22:47

Yes, interesting. In fact, so intereting that I have spent a little time shined-up the code (to my likings, of course ;-)).

Functionally, I have changed it to handle Unicode (or at least I think so, because I haven't really tested it). Unicode support is provided using UTF-8 (8 bit Unicode Transfer Format).
Attachments
scintilla.zip
scintilla control
(12.83 KiB) Downloaded 1204 times
Regards Thomas Linder Puls
PDC

User avatar
Thomas Linder Puls
VIP Member
Posts: 2344
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 8 Jan 2008 22:56

Copied to the wiki: 3rd:Scintilla Editor Control.
Regards Thomas Linder Puls
PDC

User avatar
Tonton Luc
VIP Member
Posts: 800
Joined: 16 Oct 2001 23:01

Post by Tonton Luc » 12 Mar 2008 13:07

Hi,
When I try to use this control, I've an error c100: The file 'pfc\CodepageId\CodepageId.ph' is not found.
Is it possible to use this control with VP 7.0 ?
If yes, how to solve this error ?

User avatar
Jan de Lint
VIP Member
Posts: 235
Joined: 6 Mar 2000 0:01

Post by Jan de Lint » 12 Apr 2008 19:22

I don't get this error but then I'm on 7103 CE.
The improvements from 7.0 to 7.1 are very slick.
I use scintilla for the line-wrap feature. As far as I know this is not availble with the standard controls.
]an

User avatar
Thomas Linder Puls
VIP Member
Posts: 2344
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 15 Feb 2013 15:24

Since Visual Prolog 7.4 the Scintilla Editor is part of Visual Prolog. It is both used in the IDE, and also available for use in user projects (i.e. pfc/gui/controls/sciLexer). It is also used as a control in the message window.

The examples (IDE: Help -> Install Examples...) contains an example of its usage.
Regards Thomas Linder Puls
PDC

Raza159
Posts: 1
Joined: 11 Oct 2014 10:15

Post by Raza159 » 11 Oct 2014 10:26

Hi,

I tried this program, but it has unsuccessfully been compiled because of lack of files from "pfc\profile". What is the problem about? Thank you.

Whsheng

User avatar
Thomas Linder Puls
VIP Member
Posts: 2344
Joined: 28 Feb 2000 0:01

Post by Thomas Linder Puls » 11 Oct 2014 14:57

I am not sure which program you are talking about? Is it the example?
Regards Thomas Linder Puls
PDC

Post Reply