|
-
May 27th, 2001, 01:44 PM
#1
Thread Starter
Lively Member
Right to left
I wanted a right-to-left edit box for an Arabic application in visual basic and i got it, the code for it is :
first set the alignment of the text box to right
then add the following code to the change() event of the text box
Text1.SelStart=0
but the problem is that it takes the cursor to the start of the textbox, it does not add the character to before the current character position.
what shall i do in this case....
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
May 27th, 2001, 01:51 PM
#2
Frenzied Member
It works fine. You want to make the cursor move right when a character is typed.
-
May 27th, 2001, 01:57 PM
#3
Thread Starter
Lively Member
RTL Problem
Is there another way to insert a character to the right when the character is typed.
other than "text1.selstart=0"
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
May 27th, 2001, 02:01 PM
#4
Frenzied Member
To the right just leave the Default Properties. Or what you mean is to the Left.
-
May 27th, 2001, 02:09 PM
#5
Thread Starter
Lively Member
when the enter is pressed the line is feeded at the top not at the bottom,
please test it then you will understand.
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
May 27th, 2001, 02:51 PM
#6
Thread Starter
Lively Member
is there any api to move back the cursor one character.
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
May 27th, 2001, 04:28 PM
#7
Frenzied Member
Ok i got what you are saying. Let me see if i can come up with something
-
May 27th, 2001, 04:34 PM
#8
Frenzied Member
Last edited by Jotaf98; May 27th, 2001 at 04:43 PM.
-
May 27th, 2001, 04:39 PM
#9
If you're using an Arabic locals you should be able to simply set the RightToLeft property to True.
-
May 27th, 2001, 05:04 PM
#10
Frenzied Member
Yeah, but what's the fun of it? What about if his system is not Arabic?
-
May 27th, 2001, 05:09 PM
#11
Well if your making an Arabic application the chances that your using an Arabic system locals is pretty hight, don't you think?
-
May 28th, 2001, 04:32 AM
#12
Thread Starter
Lively Member
Thank's Jotaf98 I made it.
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
Jun 7th, 2001, 06:21 AM
#13
Thread Starter
Lively Member
Thnks Jotaf but there is one another problem,
When the no of characters exceeds the width there is a problem,
I cant say it in words, you can check it your self,Would you please.
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
Jun 8th, 2001, 05:51 AM
#14
-
Jun 13th, 2001, 05:40 AM
#15
Thread Starter
Lively Member
Hey jotaf98 did you get home......
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
Jun 13th, 2001, 03:30 PM
#16
Frenzied Member
Yeah, sorry - I forgot about this thread 
I thought that was exactly what you wanted to happen. I mean, it passes the first (right-most) word to the end of the next line... isn't that how it should be in Arabic? What do you want it to be like?
-
Jun 13th, 2001, 11:20 PM
#17
Thread Starter
Lively Member
No only in this case it shall act like english, I mean that the last (left-most) word should go to the new line...
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
Jun 14th, 2001, 11:54 PM
#18
Thread Starter
Lively Member
Private Sub VBForums_Newthread()
If Thread.Question = Hard then
MSGBox "No one can reply..."
Else If Thread.Question=Easy then
Print "It's very easy.."
MsgBox "God helps those who helps themselves."
End If
End sub
-
Jun 15th, 2001, 12:08 AM
#19
PowerPoster
why are Arabians backwards anyway?! They should type like everyone else. Not trying to be racist or anything.
-
Jun 15th, 2001, 07:44 AM
#20
Originally posted by MidgetsBro
why are Arabians backwards anyway?! They should type like everyone else. Not trying to be racist or anything.
There is actually more people in the world that, if they can write , types from right to left or from top to bottom and right to left then there is people typing left to right...
Just think of all the chinese in the world....
-
Jun 15th, 2001, 04:04 PM
#21
-
Sep 12th, 2001, 08:39 AM
#22
Fanatic Member
Write-to-left (off-topic?)
Everybody writes right-to-left (at least numbers) because we stole the Arabic system when we found Roman numerals unsuited to calculation. Never wondered why numerals are described as Arabic or Roman? Anyway, write down a list of 6 digit numbers. Add them up. Which way did you write the answer? Right-to-left! Strangely most Arabs now use Hindi numerals, not Arabic ones. And they write down telephone numbers the same way Westerners do.
-
Sep 12th, 2001, 06:01 PM
#23
-
Sep 13th, 2001, 01:32 AM
#24
Fanatic Member
Err... yes, you're right. Can't think of a snappy reply to that one.
Tried your cat experiment. Doesn't work. Cat lands right side up, presumably proving that the cat has more effect than the toast. Maybe something to do with having nine lives (is the cat running multiple threads?). I want to try again with nine slices of toast but I can't find a cat big enough.
-
Sep 14th, 2001, 05:08 PM
#25
Frenzied Member
Try tiny ones instead
-
Oct 18th, 2001, 02:09 AM
#26
Thread Starter
Lively Member
-
Oct 18th, 2001, 03:03 AM
#27
Fanatic Member
If you are trying to write a right-to-left application to run under a version of Windows that does not support right-to-left, then with all proper respect to you, I think you are wasting your time.
There are a HUGE number of things to consider in right-to-left languages, and Microsoft has already done it all and provided it all in the Arabic version of Windows (which runs Urdu applications pretty well).
We wrote the first Arabic layer for Windows 3.11, way back years ago. It took us three man-years to do it, and it was a complete waste of time because Arabic Windows came out soon later.
If you make a VB app to run on Windows Arabic, then all you need to do is Text1.RightToLeft= True, and you have exactly what you need. Also handles all the other stuff automatically for you, like mixed Arabic/English, numbers (Roman, Hindi or contextual), cut and paste of Arabic/Latin text, ligatures, diacritics, hot keyboard switching, etc.. etc... It's just not practical to try to write it yourself. It would take months and months, and its all been done already for you anyway.
Brian
(Fighting with the RightToLeft bugs in VS 2005)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|