|
-
Feb 12th, 2008, 04:14 PM
#1
[2008] Insert image of line into RTB
Hey,
I am making a code editor using a RTB. I would like to add a feature to my code editor similar to the behaviour of the VS IDE: it draws a line between two subs/functions etc.
The code my code editor will process is delimited by blocks of brackets, something like C, like this:
Code:
'sub' name
{
'event' name
{
code
}
}
I would like my program to draw a line beneath the last closing bracket }, denoting the end of that block. So you would basically get:
Code:
'sub' name
{
'event' name
{
code
}
}
______________________________________
'sub' name 2
{
... etc
}
______________________________________
I have tried various ways and multiple times to draw the line using GDI+ but have come to the conclusion that it is very troublesome... I never managed it even slightly. You can't use any Paint events for the RTB which is the main reason it is hard to do, and having the line scrolled together with the text was also a pain.
I am now trying my last idea before giving up on this... I thought of inserting an image of a line into the RTB.
Now there are a few things I need clearing up on because I have never used images in RTB's before.
- Is it possible to make the line behave as though it was just a line, not an actual picture the user can manipulate, select etc..?
- If I save the contents of the RTB to file using RTB.SaveFile(path, PlainText), will the lines (images) be simply omitted, or will I have to deal with them? (the images must obviously NOT be present in the resulting code file, since other programs have to deal with those files)
- Will the image automatically move down a line when I insert a linefeed above it, just like it would do in Word for example?
And generally, is this a good idea, or am I missing a few important facts that might make this impossible?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|