Keeping text within the text box

Started by ald20, October 18, 2013, 03:09:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ald20

I grouped some shapes together and I edited the main text box associated with the group. I positioned it where I wanted it to be and set the size of the text box.

Now I want the text to be truncated if it goes outside of the box. I don't want to use TRUNC because that is a set number of characters and depending on what is entered as text that number could vary. ie. all caps would be less characters than all lower case. What I want is for the text to fill a certain amount of space, then be truncated. 

Thanks,
Art


vojo

could do the following

user.basesize = <size of group or text box when created....might be the width....say 20mm>
user.scale  = <current width or whatever> / user.basesize                 //this should be a number with no units
fontsize = 10pt * user.scale

So as the textbox or group (which ever you picked as base) shrinks....font shrinks

ald20

Thanks for the replies.

I don't want the font to shrink, I just want to only display the text that can fit within the constraints of the text box.

vojo

wow...poor mans encryption....who knew???

Seriously, not sure of the benefit of text fragments.
You might be better off doing something like this
   - Have a key word in one user cell
   - Have a description in another
   - Have a cell to conditionally merge them

something like

user.key = <keyword>
user.desc = <description or more text>
user.combo = user.key + " " + if (textbox_size > xmm, user.desc,NA)

insert user.combo into shape fiel insert fields on insert panel

obviously, can take this to the extreme for every N characters....but not sure the point of that.


wapperdude

#5
Do not believe there is anyway to do the truncation within the shapesheet. 

Might be done in VBA.  Perhaps by working with characters.  It would take some development effort though.  Somehow you'd need to determine when, for example, the 1st linefeed would trigger and prevent it and all subsequent linefeeds from happening.  At the same time, you also need to either make the additional characters invisible or set to zero size.  This assumes that you want to see the entire text at some point in time. 

Wapperdude
Visio 2019 Pro

vojo

One last thought

You could mess with the condense cell in font section.   I suspect though, that too much condensing makes the text look like
the matrix characters.

wapperdude

OK.  Ran across this article that Visio Guy did.  Looks like it'll do exactly what you want:  http://www.visguy.com/2008/02/11/lorem-ipsum-%E2%80%93-visio-ia-text-placeholder-shape/

HTH
Wapperdude
Visio 2019 Pro

ald20

Quote from: wapperdude on October 21, 2013, 09:18:32 PM
OK.  Ran across this article that Visio Guy did.  Looks like it'll do exactly what you want:  http://www.visguy.com/2008/02/11/lorem-ipsum-%E2%80%93-visio-ia-text-placeholder-shape/

HTH
Wapperdude

Thanks wapperdude, that was exactly what I was looking for!