Stephen Lebans Forms: Formatting Labels/Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

Per a suggestion on this forum, I downloaded Stephen Lebans zip file so I
can center text on labels and form fields. I looked at the example of what he
did and that's exactly what I want. However, there is no explanation of how
he did such, at least I can't find one.

I tried comparing the properties of two form fields, one centered and one
which was the traditional Access set up aligned with the top of the box. For
the life of me, I can't figure out which properties he modified that moved
text to the center of the box.

Can someone please help?

Thanks,
Robert
 
If it would be possible to do this with the standard properties, Stephen
wouldn't have made the sample database ;)

Check out the Modules and Customer forms VB-script.

Later,
Philo
 
Robert,
I just took a quick peek at Stephen's code...
Did you look at the "external" Module that came with the file? That's
where all the centering code is.
The form just calls the centering function from the Module.

Al Camp
 
Hello Al:

I thought the answer was somewhere to be found in the field or label's
Proprerties Box. But I finally figured out the modifications were done via
coding and a function. Now I have to figuure out exactly how it works.

Thanks,
Robert
 
The logic is,
For each selected TextBox control in the Detail section:
1) Determine the height of the control's contents
2) Set the TextBox Top Margin property to simulate Centered for a
Vertical Alignment prop

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top