Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

turn off text wrap on a label

Posted on 2008-10-10
8
Medium Priority
?
416 Views
Last Modified: 2013-11-28
I have a label where the caption is populated when the form is opened.  Is it possible to turn off of the text wrap on the label?

example:

If the label was the width of 8 letters and I was going to put the caption as "Hello World"

Only "Hello Wo" would be displayed.
0
Comment
Question by:ClaudeWalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 22690963
Have you tried sizing the label vertically so that it will only show one line?

This seems to work for me.
0
 

Author Comment

by:ClaudeWalker
ID: 22691129
The problem is that I have carriage returns in the caption.  
0
 

Author Comment

by:ClaudeWalker
ID: 22691131
It is the size of 3 lines worth of text.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 75
ID: 22691329
"If the label was the width of 8 letters"

Of course, that is determined by the Font being used.

"The problem is that I have carriage returns in the caption.  "

Is that good or bad?  

So, you are saying that you would want "Hello World" to appear as "Hello Wo" ?

Not quite sure what you need ?

You could limit the length of the caption in code - would that work?

mx
0
 

Author Comment

by:ClaudeWalker
ID: 22691341


That would definitely work.


0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 22691369
Here is the general idea - don't know what you have for code so far ?

PRivate Sub Form_Open(Cancel As Integer)

 '  some code

Dim sMyCaption
sMyCaption = "Hello World"

If Len(myCaption)> 8 Then myCaption = Left(myCaption,8)   ' This is the main thing here

' More code

End Sub

mx
0
 
LVL 75
ID: 22691372
Also ... do you need to get rid of carriage returns ?

mx
0
 

Author Comment

by:ClaudeWalker
ID: 22691501
That makes sense.  

No the carriage returns need to be there.

Thanks for your help,

JOe K.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question