Scintilla questions [Solved]

Linux specific forum
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Scintilla questions [Solved]

Post by Beach »

I am using the Scintilla code example found here: http://www.purebasic.fr/english/viewtopic.php?t=29320

I am able to add text to the gadget successfully with the following code:

Code: Select all

text = "testing 1 2 3" + Chr(10)
ScintillaSendMessage(#SciID, #SCI_ADDTEXT,Len(text),@text)
But I would like to be able to change the color of the font on a per line basis. Almost like syntax highlighting, except I want to color the whole line. I would not have more than two different colors though, just enough to distinguish one from the other.

Also, since I am adding the text with code, the window does not scroll with the text. I see options to do this in the documentation but nothing I tried works. Basically, I would like the Scintilla window to always show the last line.

Any clues how to do this? I could show you what I have so far but it is not that different from the code sample on the page above.
-Beach
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

I kept tinkering around with the Scintilla commands and I have what I was looking for. I am sure what I have done is not the best way to get there, and I am way open for suggestions/criticism...

Here is the code, rather large to dump in a message so I'm linking to it here:
scintilla_example.pb

Works on Windows and Linux - which is nice...
-Beach
Post Reply