Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Float Text In Textbox?

Status
Not open for further replies.

xBaseDude

MIS
Jan 31, 2002
357
US
Is it possible to "float" text within a textbox?

TIA - Wayne

sig_jugler.gif
...all this and tap dancing too!
 
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.

Possible?

Regards - Wayne

sig_jugler.gif
...all this and tap dancing too!
 
XbaseDude

Textboxe.alignment=2 && Center

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
XBaseDude,

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

Slighthaze = NULL
 
Slighthaze;

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.

Regards - Wayne


sig_jugler.gif
...all this and tap dancing too!
 
Wayne,

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.

Mike


Mike Lewis
Edinburgh, Scotland
 
Wayne:

How about trying a grid column's ALIGNMENT = 2 (middle center). That may produce what you want.

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top