Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have created a richtextbox and am using a splitter and a panel that contains another richtext box. the purpose of this will be able to look at the same file in a couple different places.

 

Im not sure what to do about updating the text from one to another though. I am using the keyup event and doing a simple

 

if rtf.text <> rtf2.text then

rtf2.text = rtf.text

endif

 

theres a couple of problems with this though. I want the text to be formatted the same between the boxes.

 

is there a way to do it other than element by element?

 

i tried doing

 

dim textb as collection

 

for each textb in rtf

rtf.textb = rtf2.textb

next

 

the problem with that is that some things such as item are read only.

 

I tried doing it a couple different ways and dont mind doing it element by element but i figured that by asking, I may learn the right ways to do things sooner.

Posted

heres another question to go along with this control,

 

 

Can I use 2 different status bars for this?

 

or might it be better to use a status bar at the bottom of the window to display the cursor position for each richtextbox?

Posted (edited)

The Text Property of an RTF box only holds the Raw text. use the .rtf property this holds the fully formatted text.

 

you can use more than one status bar on your form if u like just turn the Dock property off at design and u can move it freely to where you like

Edited by Dill

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...