Not sure if RichTextBox can do this?
-
Hi all, I want to put some info into a RichTextBox (or whichever other control might serve the purpose better) consisting of different sections. I was hoping to put a horizontal seperator between sections but I'm not sure how to do that. I'm probably missing something very simple here. I'm thinking of something similar to the
tag of HTML. Any ideas? Thanks in advance Dewald
-
Hi all, I want to put some info into a RichTextBox (or whichever other control might serve the purpose better) consisting of different sections. I was hoping to put a horizontal seperator between sections but I'm not sure how to do that. I'm probably missing something very simple here. I'm thinking of something similar to the
tag of HTML. Any ideas? Thanks in advance Dewald
-
Hi all, I want to put some info into a RichTextBox (or whichever other control might serve the purpose better) consisting of different sections. I was hoping to put a horizontal seperator between sections but I'm not sure how to do that. I'm probably missing something very simple here. I'm thinking of something similar to the
tag of HTML. Any ideas? Thanks in advance Dewald
No, a richtextbox (as it is) cannot be split. But you may have a control, which consists of two richtextboxes and a seperator between them. You may program different interactions between these two controls to give the user the feel that they are one split richtextbox (if you need such thing).
-
-
No, a richtextbox (as it is) cannot be split. But you may have a control, which consists of two richtextboxes and a seperator between them. You may program different interactions between these two controls to give the user the feel that they are one split richtextbox (if you need such thing).
Thanks, but just to be clear, I'm not looking for a split-line (or whatever you call it) with which the sections can be resized etc. I want to simly draw a horizontal black line across the width of the control and continue with more text under that. The easiest way would be to add a bunch of underscores or minusses to the textbox but I was hoping for something more elegant.
-
Hi all, I want to put some info into a RichTextBox (or whichever other control might serve the purpose better) consisting of different sections. I was hoping to put a horizontal seperator between sections but I'm not sure how to do that. I'm probably missing something very simple here. I'm thinking of something similar to the
tag of HTML. Any ideas? Thanks in advance Dewald
Hi, I have not done this myself, but it sounds like you want a ListBox (great at holding a number of items of any kind), where each item could be a RichTextBox. Make it UserDrawn and you can add RTB's as much as you want, they will be layed ou one below the other, and scrolling will be automatic. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Hi, I have not done this myself, but it sounds like you want a ListBox (great at holding a number of items of any kind), where each item could be a RichTextBox. Make it UserDrawn and you can add RTB's as much as you want, they will be layed ou one below the other, and scrolling will be automatic. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Hi, I have not done this myself, but it sounds like you want a ListBox (great at holding a number of items of any kind), where each item could be a RichTextBox. Make it UserDrawn and you can add RTB's as much as you want, they will be layed ou one below the other, and scrolling will be automatic. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Good idea Luc - interesting concept. I can imagine this being extremely usefull in lots of situations. Dewald - post back if you get it to work (maybe with a little code snippet?). This is going on my todo list for when I get a little time :-D
Dave
OK, I'm making progress but it's painfully slow. Was hoping someone could give me a nudge in the right direction. I'm at the point now where I'm trying to paint the
RichTextBox
in theListBox
(in theDrawItem
event of course). The nearest I've come so far is to use thee.Graphics.DrawImage()
method but obtaining anImage
of theRichTextBox
is proving tricky. I'm sure there has to be a better way than importing thegdi32.dll
and bit blasting the control onto an image (as explained here[^]) which is then drawn into the ListBox. Any ideas? -
Hi all, I want to put some info into a RichTextBox (or whichever other control might serve the purpose better) consisting of different sections. I was hoping to put a horizontal seperator between sections but I'm not sure how to do that. I'm probably missing something very simple here. I'm thinking of something similar to the
tag of HTML. Any ideas? Thanks in advance Dewald
Why not use the Web Browser component in edit mode?
Deja View - the feeling that you've seen this post before.