Just curious why a VERY commonly used affect of rollover was NOT implemented
in .NET 2.0 for web controls?
Does anyone have a link to VB code that will show me how to build my own
UserControl that will support a rollover?
thanks, Rob. 3 1471
Why there is not a built-in function for it in .NET, I really can't answer,
but here is a very simple function I wrote for myself (I did it using 1.1,
but I can't imagine why it wouldn't work in 2.0). Enjoy!
Public Shared Sub AddRollover(ByV al img As Web.UI.WebContr ols.Image, ByVal
rollover As String)
'Adds the rollover feature to an Image or ImageButton (or other class
that inherits from an Image)
img.Attributes. Add("onmouseove r", "this.src=' " & rollover & "';")
img.Attributes. Add("onmouseout ", "this.src=' " & img.ImageUrl & "';")
End Sub
--
Nathan Sokalski nj********@hotm ail.com http://www.nathansokalski.com/
"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message
news:OV******** ******@TK2MSFTN GP05.phx.gbl... Just curious why a VERY commonly used affect of rollover was NOT implemented in .NET 2.0 for web controls?
Does anyone have a link to VB code that will show me how to build my own UserControl that will support a rollover?
thanks, Rob.
Thanks for the suggestion/code, I ended up making a UserControl, but was
just curious why such a well used feature was not included in .NET 2.0.
Rob.
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:Ot******** ******@TK2MSFTN GP02.phx.gbl... Why there is not a built-in function for it in .NET, I really can't answer, but here is a very simple function I wrote for myself (I did it using 1.1, but I can't imagine why it wouldn't work in 2.0). Enjoy!
Public Shared Sub AddRollover(ByV al img As Web.UI.WebContr ols.Image, ByVal rollover As String) 'Adds the rollover feature to an Image or ImageButton (or other class that inherits from an Image) img.Attributes. Add("onmouseove r", "this.src=' " & rollover & "';") img.Attributes. Add("onmouseout ", "this.src=' " & img.ImageUrl & "';") End Sub -- Nathan Sokalski nj********@hotm ail.com http://www.nathansokalski.com/
"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message news:OV******** ******@TK2MSFTN GP05.phx.gbl... Just curious why a VERY commonly used affect of rollover was NOT implemented in .NET 2.0 for web controls?
Does anyone have a link to VB code that will show me how to build my own UserControl that will support a rollover?
thanks, Rob.
I'm not sure, but if I had to take a guess I would say they didn't want to
bother making a whole new class for something that can be done with very
little extra code (you saw how short my function was). I think that some of
their goals were:
1. To keep the properties as similar to those in 1.1 as possible
2. I think they wanted the Image Control to mirror the HTML img tag as
closely as possible, and the HTML img tag does not have a built-in rollover
feature
--
Nathan Sokalski nj********@hotm ail.com http://www.nathansokalski.com/
"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message
news:OE******** ******@TK2MSFTN GP03.phx.gbl... Thanks for the suggestion/code, I ended up making a UserControl, but was just curious why such a well used feature was not included in .NET 2.0.
Rob.
"Nathan Sokalski" <nj********@hot mail.com> wrote in message news:Ot******** ******@TK2MSFTN GP02.phx.gbl... Why there is not a built-in function for it in .NET, I really can't answer, but here is a very simple function I wrote for myself (I did it using 1.1, but I can't imagine why it wouldn't work in 2.0). Enjoy!
Public Shared Sub AddRollover(ByV al img As Web.UI.WebContr ols.Image, ByVal rollover As String) 'Adds the rollover feature to an Image or ImageButton (or other class that inherits from an Image) img.Attributes. Add("onmouseove r", "this.src=' " & rollover & "';") img.Attributes. Add("onmouseout ", "this.src=' " & img.ImageUrl & "';") End Sub -- Nathan Sokalski nj********@hotm ail.com http://www.nathansokalski.com/
"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message news:OV******** ******@TK2MSFTN GP05.phx.gbl... Just curious why a VERY commonly used affect of rollover was NOT implemented in .NET 2.0 for web controls?
Does anyone have a link to VB code that will show me how to build my own UserControl that will support a rollover?
thanks, Rob.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Leythos |
last post by:
I've got several sites that I used DreamWeaver MX to add RollOver buttons
to the pages, it also adds some javascript that pre-loads the images and
does the mouse_over and such.
In FireFox 1.0.1 when I load the page and it pre-loads the images the
status bar shows DONE. When I mouse over any item, it changes the image
properly, but the status (lower left of browser) shows "Read
www.somesite.com", it may also show "Waiting for...
|
by: JOSEPHINE ALVAREZ |
last post by:
I have this code that I want to use to do a rollover. However, because the
company I am doing it for is continually changing the text, I want to be
able to use dynamic text to change the text on the fly, and still have the
rollover work. I have taken the text off of the buttons, but cannot figure
out how to do it with dynamic text using javascript and html.
For example, in the columns of this row, I want to put "About...
|
by: Lauren Quantrell |
last post by:
I have constructed the following code that simulates the common
rollover effect when moving the mouse over a label (this example makes
the label bold.)
I'm wondering if anyone has come up with a better solution.
lq
'start code:
|
by: thechaosengine |
last post by:
Hi all,
Can anyone tell me what I need to do to create a 3 stage rolloever button
out of an asp.net image control.
I don't know too much about javascript or creating user controls. I'm really
hoping that someone can just tell me if there is an easy way to do it.
I normally use Dreamweaver for creating the rollover but thats just for normal
images, not server side controls. Is there any way I can use the code that
|
by: smokeyd |
last post by:
i am trying to create a simple image button rollover.. i have
searched this forum and found a number of solutions but none seem to
work. i am just trying to get the onmouseover to swap the image then
restore when rolled out on a web page in vb.net. please can someone
help?
| |
by: Casimir |
last post by:
I am looking into making pure CSS image rollovers.
Do you have any clever (and robust) CSS rollover-tricks?
Or links to such "in the wild"?
I have figured out two methods for this, but have yet to do proper
testing on browser support.
Method I:
|
by: Oriane |
last post by:
Hi there,
I would like to handle a "rollover" <asp:Buttonin the code behind with C#
with this kind of code:
Button btn = Page.FindControl("Button" + numWidget) as
Button;
btn.Attributes = "document.all." +
btn.ClientID + ".src = '/Images/blue.gif'";
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |