By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,518 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

setting the width of a popup form depending on the length of the caption

P: n/a
Hi.

I have a popup modal form which gets part of its caption from code. The
part of the caption which is determined from code is the name of the
event. For example the caption would be "Add Year for [Event Name]",
where event name is the name of the event for which the user wants to
add a year. The event names are all different lengths and sometimes when
the form pops up the caption is truncated with the ellpsis(...) Is there
a way to determine how many characters the caption will be and set the
width propoerty so that the entire caption is shown?

thanks in advance

Colin


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Straight out of Access help, it claims, "A caption... can have up to
2048 characters... captions too long will truncate."

Well, the only thing I can suggest -- (it's a work-around, really, but
you'll have to test with the various lengths that you mention) -- is
to get the length of the caption in the form open event [or where ever
you are setting it], and use that lenght to calculate a width to set
before the form is displayed.

I'm no wizard on fonts, but in the 'old-days', the font size meant
'characters-per-inch', but this is no longer true. So, the size of the
font being used will be relavant too, so keep this in mind.

I guess what I'd do is see what width is best for 50, 100, 150
characters (or 100, 200, 300, etc...) based on the font size you
select and then create a function to uses the length to set your
width.

Hope this helps.

-Paul (if need more info. let me know).
Colin Ward <cw******@sympatico.ca> wrote in message news:<3f***********************@news.frii.net>...
Hi.

I have a popup modal form which gets part of its caption from code. The
part of the caption which is determined from code is the name of the
event. For example the caption would be "Add Year for [Event Name]",
where event name is the name of the event for which the user wants to
add a year. The event names are all different lengths and sometimes when
the form pops up the caption is truncated with the ellpsis(...) Is there
a way to determine how many characters the caption will be and set the
width propoerty so that the entire caption is shown?

thanks in advance

Colin


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.