Results 1 to 5 of 5

Thread: Writing right to left in a textbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    London
    Posts
    3

    Post

    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?

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    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:
    Code:
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    London
    Posts
    3

    Post

    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)

  4. #4
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    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.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    London
    Posts
    3

    Post

    Thank you so much

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width