Main Menu

Text tool

Started by irfanmalick, October 22, 2009, 10:49:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

irfanmalick

Hi All,

I am new to visio. I tried searching for my problem and I just couldn't find it at all.

My problem is that I have a text box within in a shape. Therefore I am not using the default text editor. Now I want to be able to do 2 things.

1. Be able to set a charecter limit within the text box. If that is not possible then
2. Be able to resize the whole shape as the text box grows.

Now my shape is not just a single shape, it is a group.

I hope I am clear enough I would greatly appreciate your help.


wapperdude

Well, there's a couple of questions that come to mind
  1.)  When you say text box within a shape, you mean you've merely selected the shape and then add text?  The Text tool should work.  Since you have grouped shapes, you need to 1st select the desired shape, then select the Text tool.  Otherwise, the text tool tries to enter text at the highest (group) level.  To select the sub shape, just double click on it.

  2.)  By character limit, do you mean the number of characters?  That would not be a normal feature of Visio.  Or do you mean the character size, to keep all text within the boundaries of the shape?  That's been done, but, with mixed success.  Plus, characters can become quite small.  Conversely, you can make the text grow as a function of shape size, see:  http://www.visguy.com/2007/08/21/text-resizing-with-shapesheet-formulas.

Before you go too far, check out these links:
    a.)  Twelve text tips:  http://www.visguy.com/2009/05/06/top-twelve-text-tips/
    b.)  Designing text behavior:  http://msdn.microsoft.com/en-us/library/aa200986(office.10).aspx

  3.)  It's quite easy to make the shape size grow with the text and is covered in the above references.  And it would be possible to move shapes around to avoid the bloating shape.
        Getting shapes too move is a little more involved and is a two step process.
         a.)  1st, set shapes to move on drop.  Go to File > Page Setup > Layout and Routing tab and select "move other shapes away on drop".
         b.)  you then have to enable the feature in the shapes.  Select a shape > right click > Format > Behavior > Placement tab.  Use the scroll down arrow to select "Layout and route around".  Hit OK.  I think you have to do this for every shape.  Now they should behave as bumper cars.

Well, that's a lot.  Should get you moving forward though.   :P   ::)

Wapperdude
   
Visio 2019 Pro

irfanmalick

Thanks Wapper.

I think I wasn't a bit clear. I think it would be easier if possible if I can set a number of charecters in the text box lets say 300 characters. The objective is that the shape is grouped. In that I have inserted a text box to write something in. Now the there is no limit of how much you can write in the text box. So I want to set a limit. Is that possible in Visio?

JuneTheSecond

One of the way may be to put a formula in the shapesheet of the shape.
You can start with a formula, for example, in the LockTextEdit to limit the 10 characters
= IF(LEN(SHAPETEXT(TheText))>10,1,0)

Of course, this is not perfect, you may need to consider something more. :)
Best Regards,

Junichi Yoda
http://june.minibird.jp/

wapperdude

#4
JuneTheSecond's solution produces a once only condition.  That is, once you exceed the limit, the text editting is locked and frozen.  That's probably not what you want.  Some VBA code might be written to check the length, but, that isn't dynamic / interactive (at least, I don't think it is, but I'm not much of a programmer).

Here's an another imperfect idea, which doesn't freeze anything -- use the solution that JuneTheSecond proposes, but instead of locking the text, either change the text color or shape color or both.  This would allow the user to remove text to restore normal viewing conditions. 

It might be possible to use VBA to just change just the characters that come after the limit, see a series of articles, "Running with Characters", http://blogs.msdn.com/visio/archive/2006/08/18/704811.aspxhttp://blogs.msdn.com/visio/archive/2006/08/22/711391.aspx

There was another series of articles regarding keeping things in bounds and talked about using a couple of shapesheet functions, SetAtRefExpr and SetAtRefEval, that might be used to create a dynamic solution, see http://blogs.msdn.com/visio/archive/2006/10/03/Staying-in-Bounds.aspx

Bottom line, there is no direct, easy solution to limit the number of characters.   

Wapperdude
Visio 2019 Pro

irfanmalick

Thanks guys, I have started some experimenting but to no avail. Is is possible to stop the text box from growing after a certain point lets say 10mm. I think to achieve that I can use the protection command right?

Now if that is way to do it, how do I make sure that when it reaches that height the text a dialog states that maximum height reached something like that.

Is that possible???

wapperdude

Unfortunately, text height is one of those quirky things in Visio.  I never really quite understood the rationale behind it.  If you set the width of the text box, then, the entered text will not expand beyond the horizonatal boundaries of the box.  But, the height is not so constrained.  Text just keeps on entering.  Box height is not a constraint.  If fact, I would say, text box height is marginally useful -- good for alignment with other Tboxes and shapes, but that's about it.  You don't even get the option to constain the text vertically vs horizontally.  Probably not too useful in horizonatally entered languages, but , would be useful for vertically driven languages.


Visio 2019 Pro