textbox to label issues

M

mark

i have a freetype text box which contains text like (not exactly like
this!!) :-
{
textext eteasdadadasdasddddddddddddddaasdasd

wqeqeqweqweqwe

qweqeqeqeqwewqerqerqwerqwerqwerqwerqwerqw
qwrqwerqwer

wqeqwer
}

which is created with code like this :-

{
TextBox12.Text = TextBox12.Text + "textext
eteasdadadasdasddddddddddddddaasdasd" & vbCrLf
TextBox12.Text = TextBox12.Text + "" & vbCrLf
TextBox12.Text = TextBox12.Text + "wqeqeqweqweqwe" & vbCrLf
}


i have a button on the form that converts all textboxes to labels, but the
carraige returns dont get translated you end up with :-
{
textext eteasdadadasdasddddddddddddddaasdasd wqeqeqweqweqwe
qweqeqeqeqwewqerqerq
werqwerqwerqwerqwerqw qwrqwerqwer wqeqwer
}
in the label,

question is how can i preseve the carraige returns in the label - ? - theres
nothing in the html source that would allow me to do a replace()
on the text box contents (i'd normally replace the vbCrLf with a <br> )

cheers

mark
 
F

Fiaz Ali Saleemi

Hi Mark

Place all text of text box in between <pre>textboxtext</pre>.

for example:

label.Text = "<pre>" & textbox.Text & "</pre>"

try this and let us know. I hope this will work.

Regards
Fiaz Ali Saleemi
 
M

mark

Fiaz Ali Saleemi said:
Hi Mark

Place all text of text box in between <pre>textboxtext</pre>.

for example:

label.Text = "<pre>" & textbox.Text & "</pre>"

try this and let us know. I hope this will work.

Regards
Fiaz Ali Saleemi
that works great - to a point - it removes all formatting - it reverts back
to default font etc. anyway of getting round that ?

cheers

mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top