Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Yellow help box

Posted on 2006-05-19
9
Medium Priority
?
220 Views
Last Modified: 2010-05-18
Hello, i want to know how to show a yellow help box when the mouse is over a row from a datagrid.

Actually i have isolated the row I just need to know how to pop up the yellow help box when mouse over it. You know, this box that you don't need to click Ok or anything, just like a comment bubble.


Thanks
0
Comment
Question by:TheSonics
  • 5
  • 3
9 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16720478
1) .NET version

2) You are looking to set a ToolTip.

Bob
0
 

Author Comment

by:TheSonics
ID: 16720560
Yeah tooltip

ToolTip1 as New ToolTip
ToolTip1.setTip(control, string)
the problem is that i do not know what control to link with.


Framework 1.1
0
 

Author Comment

by:TheSonics
ID: 16720587
And to be more exact, i wish to link every component of my datagrid to a tooltip, i was thinking of doing a check on the row number and simply link to a column.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 16720588
1) Use the DataGrid MouseMove event

2) Perform a HitTest on the mouse coordinates

3) Get the RowIndex from the HitTest

4) Get the value to display as help

5) Set the Tooltip to the DataGrid, and the help value that you got from the DataGrid.

Bob
0
 

Author Comment

by:TheSonics
ID: 16720693
I did all of this, but the Tooltip is linked to the whole datagrid, so as long as the mouse is on the datagrid the tooltip stays poped
0
 

Author Comment

by:TheSonics
ID: 16720724
Is there a way (like CType) that i could convert a System.Data.DataColumn to System.windows.form ?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16720793
Are you asking a different question, or does that apply to this question?

Bob
0
 

Author Comment

by:TheSonics
ID: 16721370
Well, it is a clearer question :


Tooltip requires a control of type System.windows.form, linking to the whole DataGrid is working, but the tooltip will stay visible as long as the mouse is somewhere in the Datagrid (which represent the whole form). So I was kinda wondering if there was a way to link my Tiptool to the column. Another interesting would be to derivated a class where the visible option. I'd rather use some .NET tools.


Best Regards.
0
 
LVL 3

Accepted Solution

by:
GilesBathgate earned 1000 total points
ID: 16733664
You cant cast one type of thing into another type of thing unless they are both on the same leg of the class heirachy
 
            Object
              / \
           Control
           /        \
         /           \
DataColumn    Form
                        \
                       WindowsApplication1.Form1

E.g
Dim myForm As New WindowsApplication1.Form1
CType(myForm,Form)
or
Dim myForm as new WindowApplication1.Form1
CType(myForm,Contol)
or
Dim myDataColumn as new DataCloumn
CType(myDataColumn,Control)

BUT DEFFINATELY NOT

Dim myDataColumn as new DataCloumn
CType(myDataColumn,Form)


Anyway as for your tooltip problem .Net Framework 1.1 is a pain in the way it handles tooltips. and the support is alot better in .Net 2.0 where you can actually show it when and where to display any tooltip and make it hide whenever you like too.

The solution we came up with for 1.1 was to use unmanaged API calls to provide a better more flexible Tooltip framework.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question