Author Topic: Can't change shape text size  (Read 9094 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3794
  • Ideas Visio-lized into solutions
Re: Can't change shape text size
« Reply #15 on: July 02, 2020, 12:43:56 PM »
Yes.  Confirmed.  But, it's actually worse...

With just TxtHeight:
1) cannot resize, period
2) cannot move text box
3) can use rotation handle to rotate.

If add "/1":  similar bad behavior (no quotes)
If "/2":  still cannot resize, but, can move.

Definitely a BUG.
Visio 2019 Pro

rezingg

  • Jr. Member
  • **
  • Posts: 13
Re: Can't change shape text size
« Reply #16 on: July 02, 2020, 01:24:57 PM »
textheight just defines a box...nothing to do with text size.

for that, use the fontsize cell in shapesheet.

For kicks...make a box shape...add text....change text size on home menu....text changes box stays the same

@Vojo, this relates to the issue OP has observed, not being able to resize the text block with the text block tool. Has nothing to do with text size (subject line is a bit misleading). See detailed description I added to replicated the issue.
« Last Edit: July 02, 2020, 01:28:27 PM by rezingg »

vojo

  • Hero Member
  • *****
  • Posts: 1475
Re: Can't change shape text size
« Reply #17 on: July 02, 2020, 01:59:02 PM »
I guess I am missing the ask
- cant even see a text box
- cant even format it.
So all it will do is force wrap

If the goal here is a box that visible and formattable, then use a shape (rectangle?) and do a group and set:
- group shape to 1D
- disable selection box
- set line to intercept the handles
- Protection ==>VTX = 1
- Protection ==> height = 1

Result will be a line or connector with a box attached for text et al that behaves like a 1D connector.

or

make this
- take a connector
- add a connection point where you want to anchor the text box
- make a rectangle
- in rectangle text box
   - pinx = guard(connector pinx + or - some offset)           // E.g pinx = guard(conn.pinx - width *0.35)
   - piny = guard(connector piny + or - some offset)
           or
   - pinx = guard(connector pinx)
   - piny = guard (connector piny)
   - locpinx = width *1.2
   - locpiny = height *0.3

play around as needed

vojo

  • Hero Member
  • *****
  • Posts: 1475
Re: Can't change shape text size
« Reply #18 on: July 02, 2020, 02:00:47 PM »
or attached

rezingg

  • Jr. Member
  • **
  • Posts: 13
Re: Can't change shape text size
« Reply #19 on: July 02, 2020, 03:42:27 PM »
@vojo, thanks for your effort to find a solution.
However, I'm not really looking for a solution. I found this thread because the OP had the same issue as I had (a shape with a text block that can't be resized interactively using the text block tool). I found what causes this issue (confirmed by wapperdude to be a BUG) and published my findings, so the next person who comes to this thread has a hint what may be causing the unexpected behavior and how to fix it.
The issue is that Visio somehow parses "SomeVariable" different than "SomeVariable*1". I'm not sure if this is a wider spread phenomenon or if it is limited to this one corner case, i.e. the TxtLocPinY cell.
If you don't edit (need to control) the size or location of a shape's text block you are not going to run into this issue.
« Last Edit: July 02, 2020, 04:05:14 PM by rezingg »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3794
  • Ideas Visio-lized into solutions
Re: Can't change shape text size
« Reply #20 on: July 02, 2020, 04:13:58 PM »
@Vojo:  just follow the steps in Reply #14.

@Anyone:
It seems the TxtLocPinY cell is unique... 
  >It seems to only accept the TxtHeight cell as a reference entry.
  >It objects to the lack of a numeric multiplier
  >It objects to using division rather than multiplication to "scale" the entry.

Whereas, the TxtLocPinX does not exhibit such behavior.  It accepts
  >Formulas that use either multiplication or division
  >It accepts references to other shapesheet cells, e.g., Width, as part of the formula.

The TxtLocPinY must be treated with extreme care.  This is either by design (WHY?) or a bug. 

Has anyone tried this out with earlier versions of Visio?
Visio 2019 Pro

rezingg

  • Jr. Member
  • **
  • Posts: 13
Re: Can't change shape text size
« Reply #21 on: July 02, 2020, 04:20:30 PM »
@ wapperdude
I was able to refer to a user cell, as long as it has the format <UserVariable>*<Number>.
Also, a straight number causes the same issue as well.
« Last Edit: July 02, 2020, 04:22:43 PM by rezingg »

Croc

  • Full Member
  • ***
  • Posts: 244
    • Visioport
Re: Can't change shape text size
« Reply #22 on: July 02, 2020, 04:33:20 PM »
Quote
This is either by design (WHY?) or a bug.
Perhaps this is not a bug, but simply an under-documented property.
The fact is that when a mouse drags a text block, the formulas in the TxtHeight, TxtWidth cells do not take an absolute value, but are converting to the form Width*a, Height*b. That is, the coordinates of the mouse on the go are converted into a multiplier value. Therefore, to avoid the effect of racing or complex calculations, developers could impose a restriction on the formulas TxtLocPinX, TxtLocPinY, so that they too could have a similar form (namely, TxtWidth*a, TxtHeight*b).
This requirement seems reasonable. The only bad thing is that the developers forgot to tell everyone else about it.
Visio 2007 behaves similarly.

rezingg

  • Jr. Member
  • **
  • Posts: 13
Re: Can't change shape text size
« Reply #23 on: July 02, 2020, 04:50:54 PM »
The fact that TxtLocPinX behaves differently seems to point towards BUG rather than FEATURE.
Also, in my limited experience with Visio, I found that an interactive edit of a shape usually replaces whatever content an affected cell has with the default formula with some scale factor. In this case, when the user resizes the text block I would expect Visio to replace the content of TxtLocPinY with TxtHeight*X.
There are some exceptions, such as GUARD() and a class of functions which will not be replaced, but possibly their parameters edited, which is not the case here.

Machine

  • Jr. Member
  • **
  • Posts: 11
Re: Can't change shape text size
« Reply #24 on: July 06, 2020, 11:42:10 PM »
it appears interactive text block resizing only works if the TxtLocPinY cell content has the format <SomeVariable>*<number>. Any other cell content causes issues, including a number by itself or multiplied by another number.

It works exactly as described (in 1907).
Is this an intended behavior?