473,810 Members | 2,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image.ToolTip not working

Hi,

I have a webapplication (asp.net)

Snippet:
Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

I see the image on my form

When I place the cursor over the image the Tooltip is not displayed !
Also, I cannot save the Image with Right Click !

How can I display the ToolTip ?

Thanks
Stephane Gagnon
Nov 19 '05 #1
9 2191
I tested ur code and i can see the tooltip !!

"SteFetS" wrote:
Hi,

I have a webapplication (asp.net)

Snippet:
Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

I see the image on my form

When I place the cursor over the image the Tooltip is not displayed !
Also, I cannot save the Image with Right Click !

How can I display the ToolTip ?

Thanks
Stephane Gagnon

Nov 19 '05 #2
"=?Utf-8?B?dmluYXk=?=" <vi***@discussi ons.microsoft.c om> wrote in
news:09******** *************** ***********@mic rosoft.com:
I tested ur code and i can see the tooltip !!


Doo! I don't understand.... Have u put the snippet in the Page_Load sub ?
Nov 19 '05 #3
"=?Utf-8?B?dmluYXk=?=" <vi***@discussi ons.microsoft.c om> wrote in
news:09******** *************** ***********@mic rosoft.com:
I tested ur code and i can see the tooltip !!


Ok ... try this and the tooltip will not work

I think it is because the image is ''UNDER'' the Table

____

Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

Dim TotalJeux As Integer = 5
Dim RollPerJeu As Integer = 5

Dim j As Integer

For j = 0 To TotalJeux - 1

Dim Jeu As New TableRow
Jeu.Width = Unit.Percentage (100)
Trim.Rows.Add(J eu)

Dim i As Integer
For i = 0 To RollPerJeu - 1
Dim Rouleau As New TableCell
Rouleau.Text = "Rouleau" & i.ToString
Rouleau.BorderC olor = Color.Black
Rouleau.BorderS tyle = BorderStyle.Sol id
Rouleau.BorderW idth = Unit.Pixel(1)
Select Case i
Case 0
Rouleau.Width = Unit.Percentage (20)
Case 1
Rouleau.Width = Unit.Percentage (30)
Case 2
Rouleau.Width = Unit.Percentage (20)
Case 3
Rouleau.Width = Unit.Percentage (10)
Case 4
Rouleau.Width = Unit.Percentage (20)
End Select

Jeu.Cells.Add(R ouleau)

Next i

Next j
End Sub
Nov 19 '05 #4
Maybe you have Web Browser compatibility issue.

From MSDN about ToolTip:
"This property is rendered for all browsers. However, only Microsoft
Internet Explorer will display this property as a ToolTip. All other
browsers will ignore this property".

Leszek Taratuta

"SteFetS" <NO************ *@hotmail.com> wrote in message
news:Xn******** *************** ***********@207 .35.177.135...
Hi,

I have a webapplication (asp.net)

Snippet:
Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

I see the image on my form

When I place the cursor over the image the Tooltip is not displayed !
Also, I cannot save the Image with Right Click !

How can I display the ToolTip ?

Thanks
Stephane Gagnon

Nov 19 '05 #5
"Leszek Taratuta" <ad*@taratuta.n et> wrote in news:ek$U6Wl$EH A.1524
@TK2MSFTNGP09.p hx.gbl:
Maybe you have Web Browser compatibility issue.


Look at my last post in this topic.

I create a table with rows and cells

After I create an Image and the tooltip is not working.

If I don't create the table the tooltip work fine.

Nov 19 '05 #6
This is what i got in viewsource..
Please check the page viewsource if it has created "title='Tro u'"

<img id="Image1" title="Trou"
src="http://localhost/WebApplication1/CGAM.bmp" border="0"
style="left:50% ;top:50%;positi on:absolute;" />
"SteFetS" wrote:
"Leszek Taratuta" <ad*@taratuta.n et> wrote in news:ek$U6Wl$EH A.1524
@TK2MSFTNGP09.p hx.gbl:
Maybe you have Web Browser compatibility issue.


Look at my last post in this topic.

I create a table with rows and cells

After I create an Image and the tooltip is not working.

If I don't create the table the tooltip work fine.

Nov 19 '05 #7
"=?Utf-8?B?dmluYXk=?=" <vi***@discussi ons.microsoft.c om> wrote in
news:D3******** *************** ***********@mic rosoft.com:
This is what i got in viewsource..
Please check the page viewsource if it has created "title='Tro u'"


Yes I have it but try the following code and it will not work no more :o(
Sub Page_Load

Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

Dim TotalJeux As Integer = 5
Dim RollPerJeu As Integer = 5

Dim j As Integer

For j = 0 To TotalJeux - 1

Dim Jeu As New TableRow
Jeu.Width = Unit.Percentage (100)
Trim.Rows.Add(J eu)

Dim i As Integer
For i = 0 To RollPerJeu - 1
Dim Rouleau As New TableCell
Rouleau.Text = "Rouleau" & i.ToString
Rouleau.BorderC olor = Color.Black
Rouleau.BorderS tyle = BorderStyle.Sol id
Rouleau.BorderW idth = Unit.Pixel(1)
Select Case i
Case 0
Rouleau.Width = Unit.Percentage (20)
Case 1
Rouleau.Width = Unit.Percentage (30)
Case 2
Rouleau.Width = Unit.Percentage (20)
Case 3
Rouleau.Width = Unit.Percentage (10)
Case 4
Rouleau.Width = Unit.Percentage (20)
End Select

Jeu.Cells.Add(R ouleau)

Next i

Next j
End Sub
Nov 19 '05 #8
it works, try this ..

Dim TotalJeux As Integer = 5
Dim RollPerJeu As Integer = 5

Dim j As Integer

For j = 0 To TotalJeux - 1

Dim Jeu As New TableRow
Jeu.Width = Unit.Percentage (100)
Trim.Rows.Add(J eu)

Dim i As Integer
For i = 0 To RollPerJeu - 1

Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image" & i
Img.ToolTip = "Trou" & i
Img.ImageUrl = "http://localhost/WebApplication1/GE Logo1.jpg"

Dim Rouleau As New TableCell
Rouleau.Text = "Rouleau" & i.ToString
Rouleau.BorderC olor = Color.Black
Rouleau.BorderS tyle = BorderStyle.Sol id
Rouleau.BorderW idth = Unit.Pixel(1)
Select Case i
Case 0
Rouleau.Width = Unit.Percentage (20)
Rouleau.Control s.Add(Img)
Case 1
Rouleau.Width = Unit.Percentage (30)
Rouleau.Control s.Add(Img)
Case 2
Rouleau.Width = Unit.Percentage (20)
Rouleau.Control s.Add(Img)
Case 3
Rouleau.Width = Unit.Percentage (10)
Rouleau.Control s.Add(Img)
Case 4
Rouleau.Width = Unit.Percentage (20)
Rouleau.Control s.Add(Img)
End Select

Jeu.Cells.Add(R ouleau)

Next i

Next j


"SteFetS" wrote:
"=?Utf-8?B?dmluYXk=?=" <vi***@discussi ons.microsoft.c om> wrote in
news:D3******** *************** ***********@mic rosoft.com:
This is what i got in viewsource..
Please check the page viewsource if it has created "title='Tro u'"


Yes I have it but try the following code and it will not work no more :o(
Sub Page_Load

Dim Img As New System.Web.UI.W ebControls.Imag e
Img.ID = "Image1"
Img.ToolTip = "Trou"
Img.ImageUrl = "http://localhost/images/0.bmp"
Img.Style.Add(" left", "50%")
Img.Style.Add(" top", "50%")
Img.Style.Add(" position", "absolute")
Page.Controls.A dd(Img)

Dim TotalJeux As Integer = 5
Dim RollPerJeu As Integer = 5

Dim j As Integer

For j = 0 To TotalJeux - 1

Dim Jeu As New TableRow
Jeu.Width = Unit.Percentage (100)
Trim.Rows.Add(J eu)

Dim i As Integer
For i = 0 To RollPerJeu - 1
Dim Rouleau As New TableCell
Rouleau.Text = "Rouleau" & i.ToString
Rouleau.BorderC olor = Color.Black
Rouleau.BorderS tyle = BorderStyle.Sol id
Rouleau.BorderW idth = Unit.Pixel(1)
Select Case i
Case 0
Rouleau.Width = Unit.Percentage (20)
Case 1
Rouleau.Width = Unit.Percentage (30)
Case 2
Rouleau.Width = Unit.Percentage (20)
Case 3
Rouleau.Width = Unit.Percentage (10)
Case 4
Rouleau.Width = Unit.Percentage (20)
End Select

Jeu.Cells.Add(R ouleau)

Next i

Next j
End Sub

Nov 19 '05 #9
"=?Utf-8?B?dmluYXk=?=" <vi***@discussi ons.microsoft.c om> wrote in
news:BE******** *************** ***********@mic rosoft.com:
it works, try this ..


Yes It works :)

But... if I add text property for the TableCell, it is not displayed !

Rouleau.Width = Unit.Percentage (20)
Rouleau.Text = "B0A55A2001 100"
Rouleau.Control s.Add(Img)

Text and Image cannot cohabit within a TableCell ?

PS: I don't see the Text when I View Source :(
Nov 19 '05 #10

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

Similar topics

1
1764
by: luckyjameel | last post by:
HI Friends Is it Possible to put a image in a tooltip if so how can i do that Regards Lucky
1
1367
by: mphanke | last post by:
Hi, I would like to place an Icon on an Image. If the mouse is over this Icon, I want to display the associated text in a tooltip. How would I do this? Any ideas? My last request wasn't answered so I give it a second try. Best regards,
6
403
by: ltt19 | last post by:
HI everyone, So, I have many buttons, and all of them must show a tooltip with the same string, except one word, that I must read this owrd from a variable. Although, the "ToolTip on x" property do not let me to write a little paramter of concanatantion (at least I was not able to do this). Does someone has any ideas? Any help will be very useful. Thanks in advance.
9
6259
by: Maxi | last post by:
There is a very good javascript available at the following link that displays image and text wherever mouse follows a link. http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm I have a question and not sure who to ask. I used this script and it is working fine. I changed those two images and put my own. Image1 is of 600 width and 340 height and Image2 is of 560 width and 794 height.
1
16517
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX - microlink pattern tutorial : A microlink is a link that opens up
2
1637
by: Eadmund | last post by:
Hi all, Odd question / problem: I'm using a tooltip fom the "Dynamic Drive DHTML code library (www.dynamicdrive.com) - v-cool" - (snipits that are relevant trimed for readability and included below). I want to be able to drag the tooltip image (this is working fine) BUT leave a copy behind as I drag. ie. if you drag slowly, you just get a solid tooltip sized line behind the object. Any idea how this can be achieved?
3
4675
by: Rainer Queck | last post by:
Hi NG, working on a project in VS2005 I started to add ToolTips. My problem now is, that each ToolTip only shows once. mouving the mouse over a button shows its tooltip, moving to the next button show the coresponding tooltib. If I now move back to the first button the tooltip does not popup again. Is there "some setting" responsible for that? What must I do, that the tooltip is shown every time the mouse moves over the control?
1
2055
by: =?Utf-8?B?RnJlZEM=?= | last post by:
My application uses the tooltip to display "realtime" data. When a user hovers over a control, information like temperatures and pressures are displayed in the tooltip. Using tootip.SetToolTip(controlName,text) the controls tooltip is updated every second. There are 50+ of these controls on a form. I have used perfmon and graphed the working set of my application to track this problem to the tooltip method. With tooltip.SetToolTip...
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10378
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.