473,395 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

tool tip for variable

Hi,
My application has a rich text box.When i hover the mouse over certain
keywords typed in the text box i want a tool tip to be displayed.Any
idea of how i can accomplish this????
i will be glad if someone can help me plz...

Mar 29 '06 #1
9 1538
ToolTip tt = new ToolTip();

tt.SetToolTip(yourControl, "This is the tooltip");

You can also do this in the designer - see this article:
http://msdn2.microsoft.com/en-US/lib...aa(VS.80).aspx

Josh
http://www.thejoyofcode.com/

Mar 29 '06 #2
Josh Twist wrote:
ToolTip tt = new ToolTip();

tt.SetToolTip(yourControl, "This is the tooltip");

You can also do this in the designer - see this article:
http://msdn2.microsoft.com/en-US/lib...aa(VS.80).aspx

Josh
http://www.thejoyofcode.com/


I think the OP wanted to be able to specify a tooltip for certain
sections of text in the RichTextBox. That would set a tooltip to the
whole control wouldn't it?

Not sure how you *would* go about setting tooltips just for certain bits
of text though.
Mar 29 '06 #3
Hi,

David, you're right, that is what Vinod is looking for.

Vinod...

This link will give you the idea... You will require the EM_CHARFROMPOS
message to get the character under the mouse's position. (InterOp
method)

<http://www.vb-helper.com/howto_richtextbox_word_under_mouse_tooltip.html>

Note : This is a VB 6.0 method, but hopefully you can adapt the syntax
to C#.

Regards,

Cerebrus.

Mar 29 '06 #4

Cerebrus wrote:
[snip]
Note : This is a VB 6.0 method, but hopefully you can adapt the syntax
to C#.


Wow, first time for everything I guess :)

--
Larry Lard
Replies to group please

Mar 29 '06 #5
I clearly misread the post. How embarassing, sorry!

Josh

Mar 29 '06 #6
Larry wrote :
Wow, first time for everything I guess :)


What exactly do you mean, Larry ? I know it can be difficult for some
to convert between languages, but unfortunately it was the only thing I
could find... ;-)

Regards,

Cerebrus.

Mar 29 '06 #7

Cerebrus wrote:
Larry wrote :
Wow, first time for everything I guess :)


What exactly do you mean, Larry ? I know it can be difficult for some
to convert between languages, but unfortunately it was the only thing I
could find... ;-)


Well, I spend more time in the .vb group, and a very common theme there
is that someone has found a C# sample to do X, and needs help
translating it into VB.NET. It's refreshing to see a VB6 sample offered
to a C#er :) But I suppose it makes sense, as the way VB6 people have
had to access the Win32 API for all these years is very close in
feeling to P/Invoke and Interop.

--
Larry Lard
Replies to group please

Mar 29 '06 #8
Hi Larry,

To tell you the truth, I spend most of my time in the VB group too. So
much so, that when I found and was posting the link to the sample, only
then I realized that this question was in the C# group. I thought, "Oh
well... he can convert it if he likes."

BTW, I'm not so fluent with the Win32 API and interop thing, so if you
know any good links where I could learn this...

Regards,

Cerebrus.

Mar 29 '06 #9
Hey Vinod,

Did you actually get this working?

Josh

Mar 30 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dcolford2000 | last post by:
Hi All - I'm new to python Is there an impact analysis tool out there that can cross reference python -- VB has a couple of these tools (eg. Visual Expert) TIA, All comments welcome Dave
8
by: Sebastian Kerekes | last post by:
Greetings, I'm developing an application that supports multiple languages. In my XSL I use variables to place the text where it belongs to. At the top of the document I include those variables -...
3
by: for.fun | last post by:
Hi everybody, I am looking for a XML comparison tool (I do not mean a standard char-by-char diff tool but a tool which understand XML syntax) More precisely, I can have serveral XML...
4
by: zlf | last post by:
Hi, When programming, some time there is a need to change some variables' name while finding a better name. However manually change it one by one is so tedious and time-consuming. What I am...
16
by: kazak | last post by:
Hello, I am looking for C code analysing tool, My problem is: To discover the portion of code that depends on(deals with) a number of specified structures and variables. Sample: void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.