need to right justified numbers in a single line text box 
Author Message
 need to right justified numbers in a single line text box

How do you right justified numbers in a single line text box? In the VB
Help it says: If the MultiLine property setting of a TextBox control is
False, the Alignment property is ignored. But I do not want to set the
multiline property to true. Help.

We are using VB 4.0 16 bit with either  windows 3.1 or windows 95.



Tue, 06 Jul 1999 03:00:00 GMT  
 need to right justified numbers in a single line text box



Quote:
> How do you right justified numbers in a single line text box? In the
VB
> Help it says: If the MultiLine property setting of a TextBox control
is
> False, the Alignment property is ignored. But I do not want to set
the
> multiline property to true. Help.

> We are using VB 4.0 16 bit with either  windows 3.1 or windows 95.

My method is to set Multiline=True but trap the Enter Key - Ascii 13 -
in the Keypress event of the textbox e.g.

if keyascii = 13 then
   keyascii= 0
   exit sub
endif

That way the user cannot enter multiline text.

Cheers,

Dave



Tue, 06 Jul 1999 03:00:00 GMT  
 need to right justified numbers in a single line text box

Thank you for the reply. My colleague tried this and he said that when he
did this, it works fine in windows 95, but in windows 3.1 you can't see
what you typed in. Do you have this problem also?

Quote:
> My method is to set Multiline=True but trap the Enter Key - Ascii 13 -
> in the Keypress event of the textbox e.g.
> if keyascii = 13 then
>    keyascii= 0
>    exit sub
> endif
> That way the user cannot enter multiline text.



Tue, 06 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Right Justify of text in a text box,

2. Right-justify numbers in a list box?

3. Right-justified text-boxes under Windows 95B

4. Help! Right justify in a Text Box

5. VB3:Right justify Text Box

6. How to justify both Right and Left in a Text Box

7. Right-Justify in Text Box?

8. Right Justified Text Box

9. How do force text boxes to right-justify???

10. Right justified text boxes don't display on Win 3.1

11. Problem on Right Justifying the Text Box in VB4

12. How to right justify text in a MasK Ed Box using API

 

 
Powered by phpBB® Forum Software