473,387 Members | 1,379 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,387 software developers and data experts.

Make a TextBox tooltip appear in-place (same as overly wide TreeView node texts)

I'm trying to mimic how the TreeView shows a full text inplace tooltip
when the mouse hovers over of TreeView node whose text is truncated
due to skinny form or panel.
In the IDE I have
Text1.text is 'A rather longish bit of text, may a really long
pathname or something similar';
ToolTip1.OwnerDraw is True (this causes ToolTip1_Draw() to run)

I was hoping this would work...

private void toolTip1_Draw(object sender, DrawToolTipEventArgs
e)
{
ToolTip1.Show(e.ToolTipText, e.AssociatedWindow,
0,0,5000);
}

But it throws Win32Exception .. Error creating window handle.

Can anyone recommend some quick and dirty code for doing inplace
tooltips ?

Sep 27 '07 #1
1 2770
Richard <ri************@devenezia.comwrote in
news:11*********************@n39g2000hsh.googlegro ups.com:
A rather longish bit of text, may a really long
pathname or something similar


private void textBox1_MouseHover(object sender, System.EventArgs e)
{
this.toolTip1.SetToolTip( ((TextBox)sender), ((TextBox)sender).Text );
this.toolTip1.Active = true;
}
Sep 27 '07 #2

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

Similar topics

2
by: watcher | last post by:
I want to write some words to tell the user what is the TextBox's requirement when user mouse hover a TextBox,but i could not find out this attribute. many thanks.
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
2
by: melanieab | last post by:
Hi, Is there an easy way to say, on textboxHover, if the text inside the box isn't completely visible, have a popup tool come up showing the complete contents of the box? I'm guessing I need to...
5
by: John Dolinka | last post by:
I am trying to change a tooltip on an asp.net (framework 2) textbox with out a post back to the server. I can access many of the textbox properties and change them but not the tooltip. Below is a...
2
by: Edward | last post by:
I made a pure css tooltip which unfortunately appears UNDER the other tooltip links. Does anyone know how I can get it to appear ON TOP OFF all the other text on the page? example and code:...
4
by: juergen | last post by:
Hello everyone, I want to display a help text when in help mode in my application. Something like a tooltip. Now my application is a taskbar deskband and so not everything works what normally...
2
by: Vivek | last post by:
I have two html files Parent.htm and Child .htm Following is the code inside the Parent.htm: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title></title>...
5
by: casperrr | last post by:
Hi. I'm beginner to Javascript so my question maybe would sound dumb to you. Anyway, I'm editing a script for my blog and a line goes like this: document.write('<a href="' + alturl + '">' +...
2
daJunkCollector
by: daJunkCollector | last post by:
I am trying to display a column from a database table in the column of a datagrid. I am using a template column to display it. There are two things that are important to me: 1. If...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.