Grouped TExtboxes

dualshock03

Well-known member
Joined
Jan 28, 2007
Messages
105
Programming Experience
1-3
Hi Pros!!!

i got questions...

"how to create all textboxes in a group control, input float or integers only?"

Im using 5 textboxes inside a GroupBox control and i want only the user to input numbers.. Aside from using masked textboxes it is something to do with the function code.. and i cant figure it out..
 

Attachments

  • sjsf.gif
    sjsf.gif
    10.3 KB · Views: 25
use the NumericUpDown control instead of textbox's

or for all the textbox's use the e.Keychar.IsNumeric(e.KeyChar) in the KeyPress event to determine if it's a number being pressed or not

i personally would use the NumericUpDown controls for this as it simplifies things and handles the user input for you
 
Juggalo, do you know how to hide the UP DOWN buttons on the right hand edge of the numeric up down? I usually put a label on top of them, but i'd love to know if there is a proper solution!
 
not that i know of because if you're allowing the user to input a numeric value usually the user likes the ability to click an increase or decrease amount button (the up down buttons). perhaps if the paint event where overridden or something you could make it so the control draws everything except the buttons, i would have to look into this but i also am not sure where to start either
 
Back
Top