Visio Guy

Visio Discussions => General Visio => Topic started by: anonion on June 24, 2020, 10:41:13 PM

Title: Can't overlay textbox on custom connector
Post by: anonion on June 24, 2020, 10:41:13 PM
Hi there,

I followed this topic (http://visguy.com/vgforum/index.php?topic=1651.0) to create a custom connector with two labels on either end. But I can't seem to get the text to be in front of the connector instead of overlapping it. I tried filling the text boxes and going to Font > Text Block > Solid Color. Bringing the text box to the front also doesn't help.

Here is an example of what I mean: https://imgur.com/FXGUb0D. I've coloured the boxes to make it easier to see.
The connector I made is on the left, and the behaviour I am looking for is on the right.

Can anyone advise how to do this?
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 25, 2020, 04:07:14 AM
either

connector:  home==> arrange==>send backward
test box:    home ==> arrange ==> bring forward
Title: Re: Can't overlay textbox on custom connector
Post by: Yacine on June 25, 2020, 10:50:19 AM
If a group shape has a geometry section, this geometry will always be on front of the child shapes.
If you want it on the back, you'll have to insert that geometry in a separate sub-shape - in your case a separate connector.
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 25, 2020, 11:14:46 AM
I assume he handled the 1D to 2D thing and the group is the text box + connector.
so all I am saying is that he needs set the Z order.
Title: Re: Can't overlay textbox on custom connector
Post by: wapperdude on June 25, 2020, 01:46:06 PM
Why not just upload your connector in a Visio file so we can see exactly what you did?  Simpler.  Easier.  More efficient.  Exact.
Title: Re: Can't overlay textbox on custom connector
Post by: anonion on June 25, 2020, 08:16:13 PM
Quote from: vojo on June 25, 2020, 04:07:14 AM
either

connector:  home==> arrange==>send backward
test box:    home ==> arrange ==> bring forward

I do wish it was that easy. Neither button has any effect on any shape or the connector.

Quote from: Yacine on June 25, 2020, 10:50:19 AM
If a group shape has a geometry section, this geometry will always be on front of the child shapes.
If you want it on the back, you'll have to insert that geometry in a separate sub-shape - in your case a separate connector.

I think I understand this, but I'm not sure how to implement it. The connector created itself when I changed the ObjType and it also created the geometry section automatically.

Quote from: wapperdude on June 25, 2020, 01:46:06 PM
Why not just upload your connector in a Visio file so we can see exactly what you did?  Simpler.  Easier.  More efficient.  Exact.

Great idea, see attached.


So here's what I did to create this shape

1. Create two text boxes and align the horizontially
2. Group them
3. Set shape behavior to 1D
4. Change ObjType to 2

I have also tried adding the geometry section in-between step 3 and 4.
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 26, 2020, 03:55:00 AM
Essentially you created a group that has some specific setting around 1D behavior

So
Select shape
Select box or connector
got to home ==> arrange==> send backware or bring forward

essentially, arrange allows you specify z order of shapes
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 26, 2020, 04:31:49 AM
as you can tell....previous uses a text box approach in the connector

in shape sheet ==> add section ==> text transform
this creates a text block section (for laying out the text as if it were like a text file margines etc)
this also create a text transform (for laying out where you want the text box to sit...similar to a shape)
so you use text transform to put the text where you want it....use text block on define text margines.tabs, etc

if you want a box around the text, you need add a shape geometry to shape the echos the text.
Lots of tutorials on the web and here.

of course you can had spaces before an after the text

Sorry for confusion...I had connectors like you wanted and mistaked these for those ...but can find those right now
Will keep looking.

If I recall, your approach involves
- settings for the shape handles
- behavior settings
- etc.

will keep looking
Title: Re: Can't overlay textbox on custom connector
Post by: Yacine on June 26, 2020, 06:46:47 AM
Try the attached file. It shows the implementation.
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 26, 2020, 11:32:57 AM
Yacine....thx
Title: Re: Can't overlay textbox on custom connector
Post by: anonion on June 26, 2020, 02:44:12 PM
Thanks Yacine, this helps a lot. I realize now after looking at the Drawing Explorer that I needed to add a dynamic connector to the group.
I thought that after setting ObjType to "2", Visio created a connector, but this apparently isn't the case. It was a fake connector!

Thank you both for your help.
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 28, 2020, 04:52:58 AM
here is an alternative approach

Basically a box tracking to a control point

So far, seems to work good....so maybe it helps
Title: Re: Can't overlay textbox on custom connector
Post by: vojo on June 28, 2020, 04:54:53 AM
the alternative connector