I use a 12pt font in a 36pt textbox. Right now this numeric value is appearing upper right in the textbox. I'd like for it to be centered horizontally and vertically within the textbox.
While Mike has the solution to half your problem the other half isn't so easy. I'm not sure how you would effectuate the entry being vertically centered. Need to create a 36pt rectangle of sorts and then just center a 12pt textbox in it or something. Don't know, I'm sorry. What is this being used for or what is it you are creating with this? I can't figure out why someone would need to do something like this. I know that doesn't help you in the least, but it may help me.
I know that doesn't help you in the least, but it may help me.
I've always been fascinated by the user interface, and strive to create *clear* good looking forms. (My wife is my version of an MS study group.[g] If *she* can figure out what I mean...anyone can see...[shhh] good thing she never comes here!)
Anyway, it goes back to the previous thread about dropping 2 textbox on the grid. Since I have 2 rows, I have a textbox which shows *something* like the record no. of the 2 records, centered (horizontal centers) on the 2 rows. No user input is expected, and it's just for "display" purposes.
-------------------------------------------------- Grid
xxxxxxxxxx [textbox] One Record is here....
x 1 x
xxxxxxxxxx [textbox] Next line in record is here....
-------------------------------------------------- Grid
Design is something I struggle with...coding seems to come easier.
You can't centre text vertically within a textbox. But you can (with a bit of effort) centre it an editbox.
You would have to work out the number of lines the editbox is displaying, and the number of lines of your text, then pad the text with line-feeds so that it pushes it down to the correct place.
It's a bit clumsy, but if you really must do it, that would be one way to go.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.