PDA

Click to See Complete Forum and Search --> : Writing right to left in a textbox


AmirD
Jan 27th, 2000, 07:21 PM
Hi everybody,

I want to write in a textbox, from right to left without using righttoleft property, (e.g. in English version of windows). The main problem is when the text is to be wraped the wraped section is from the beginning of the text rather than last part.

Can anyone please help me how can I make it work?

DiGiTaIErRoR
Jan 27th, 2000, 07:40 PM
If you mean:
I type:
Hello World
and it shows:
dlroW olleH
You could do this several ways! I'll go over a few:
If you want it on change(whenever something is changed) you could to this:
Text1.SelStart = 0
or:
SendKeys "{Left}"

Now if you want it to do it when you click a button you can do this:

Dim ReverseMsg as String
For x = 1 to Len(Text1.Text)
ReverseMsg = Mid$(Text1.Text,x,1) & ReverseMsg
Next x
Text1.text = ReverseMsg

Hope I helped!

------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.

AmirD
Jan 27th, 2000, 07:58 PM
Thanks DiGiTaIErRoR,

I had tried those methods you mentioned before, it works fine if you are working in just one line, but as I said the problem arises when you want to wrap the text, for example:
ereh .ereh parw dluohs siht ,dlrow lleH

if you want to wrap it after the dot, it becomes:

ereh .ereh parw dluohs siht ,dlrow
olleH

while it should be like:
.ereh parw dluohs siht ,dlrow lleH
ereh

Can anyone help me with that?(please)

DiGiTaIErRoR
Jan 27th, 2000, 08:21 PM
You'ld have to parse each line... Look in the help on this site and look for extending the textbox control.

------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.

AmirD
Jan 28th, 2000, 03:08 AM
Thank you so much

I'll try it, and I hope it works.