actual painted text

R

RUDWAN

hi
i have textboxes , filled by some values ,
how i could know the actual filled text width
like : rudwan = 10 pixels
dumorgaan = 12 pixels
because ,
i would like to adjust disrtibutes align for all texts
as same as ms word , ( align distributes)
to make it all same width
-ABCDEFGH
-abcdef
will be like this
-ABCDEFGH
-a bcd ef
 
A

Allen Browne

This is messy, involving API calls to get the font metrics.

Stephen Lebans has an example of manipulating that to do something different
(resize the control to fit the text) at:
http://www.lebans.com/autosizefont.htm

You may be able to use that in combination with the Distribute option for
TextAlign property of the control.
 
S

Stephen Lebans

Here is a previous post of mine on this subject:



Three methods to produce fully justified text on an Access report.

1) A2K or higher supports a Distribute property for TextBox controls.
There is a bug/feature of the Distribute property whereby the last line
of the paragraphi is fully justified even if it contains a single word.
Unfortunately there is no fix for this issue.


2) The Justify ActiveX control for Forms or Reports here:
http://www.lebans.com/xjustifytext.htm
Produce Fully Justified Text. Bind this control to your Memo field to
create professional looking reports! This is an ActiveX control that can
ct as a Label or TextBox. This control has RecordSource just like a
normal Access TextBox so it can be bound to a field or contain a
calculated expression. Developed for Microsoft Access97.
Requires VB6 Runtime files.


3) The RTF ActiveX control for Forms or Reports here:
http://www.lebans.com/richtext.htm
RTF2 control is an ActiveX RTF solution written in VC++. The RTF2
control is a complete editing/printing solution for Access 97 or higher.
Autosizing of the RTF2 control is supported for A2K or higher.

--

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top