Tooltip like messages for connectors..

A

ahmadka

Hi guys...Got another question...

Here is what I want: Say there are two routers being displayed in a drawing,
and there is a connector connecting the two routers...What I want is that
when the user hovers the mouse over the connector, the small tooltip like
message should show up, showing the network prarameters that connector
repersents, such as its bandwidth, the utilization rate (how much is the link
being utilized), etc...

I have seen this other person do this, but he won't tell me how he did it
:p...
 
D

David Parker

Every shape has a ScreenTip (Miscellaneous section / Comment cell) which can
display a certain number of characters.
In the ShapeSheet, you can enter a formula to display the values from other
cells, such as
="Data1:" & Prop.MyData1 & CHAR(13) & CHAR(10) & "Data2:" & Prop.MyData2
Of course, you need to populate these cells in some way...
 
A

ahmadka

Thanx for your help, but it would be great if you could also provide some
sample code, since I have never tried this stuff before :)...
 
D

David Parker

It is difficult to guess the experience level of some users when they post
questions.

For example, if you are a developer, then I would expect that you have :
1. downloaded and read the Visio SDK
2. downloaded and read the newish Visio Developer Workshop
3. read the Develping Microsoft Visio Solutions [DMVS] online (or got a
copy of the book even though it is several years old)
4. subscribe to the Visio Insight blog
5. regularly visit the Visio Developer Portal
6. be aware of Graham Wideman's book
7. visit the Visio MVP website
8. visit the Visio Guy web site
9. etc

If you are not a developer, but a power user, than I apologise for my
terseness, but you are going to need to use the ShapeSheet to enter the
formulae that you need.
The ShapeSheet is similar to an Excel spreadsheet except it is divided into
sections. The Visio SDK has documentation for the ShapeSheet with all the
functions explained. DMVS has chapters about the ShapeSheet which is worth
reading.
The other knowledge you need is to understand the Master/Instance
relationship because this means that (with certain exceptions) you can edit
the local Master shape and automatically update all of its shape instances
in a document.
Also, a power user may well be expected to write a little VBA to expedite
tasks.

So, are you a developer or a power user?
 
A

ahmadka

OK, I managed to get the screentip working, I used the following code:

tempShape.get_CellsSRC((short)Microsoft.Office.Interop.Visio.VisSectionIndices.visSectionObject,
(short)Microsoft.Office.Interop.Visio.VisRowIndices.visRowMisc,
(short)Microsoft.Office.Interop.Visio.VisCellIndices.visComment).FormulaU =
"\"" + "Router " + (temp) + "\"";

The only problem is, all the text I specify to be shown in the SceenTip is
begin shown is just one line. How can I make the screentip move to the next
line ? I tried the "\n" string but that didnt do the trick.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top