473,769 Members | 4,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: How to eliminate selection rectangle on ImageButton?

I don't know if this can even be done, but I'd REALLY like to eliminate
the selection rectangle that appears around my ImageButton controls
when the user clicks on them. The buttons are on a black background,
and the selection rectangle looks like complete crap.
Any suggestions are greatly appreciated!!

Thanks!

Nov 19 '05 #1
10 2061
On 26 Jan 2005 09:32:31 -0800, "Tyrant Mikey"
<mi***********@ civigenics.com> wrote:
I don't know if this can even be done, but I'd REALLY like to eliminate
the selection rectangle that appears around my ImageButton controls
when the user clicks on them. The buttons are on a black background,
and the selection rectangle looks like complete crap.
Any suggestions are greatly appreciated!!

Thanks!


Do you have a URL example to look at?

I

--
Iain Norman | http://www.eliteforum.org
Nov 19 '05 #2
No, I don't have a sample, really. What I've got, though is pretty
straightforward .

I have an ASP.NET page. There's an ImageButton control on it, with a
Windows bitmap loaded into it (the images contain text, and they look
much better as BMPs then JPGs or GIFs). The images are are rounded
buttons, set against a black background. The page looks great, right up
until the user clicks on the button. At that point, the focus rectangle
appears on the control, and ruins the visual consistency of my page (a
white dotted rectangle forms around a capsule-shaped button).

What I'd like to do is hide the selection/focus rectangle on the image
buttons if possible.

If it can't be done, I'll just have to accept that. But it sure would
be nice to be able to get rid of it.

Nov 19 '05 #3
Actually I just uploaded a snapshot of the problem:
http://img.photobucket.com/albums/v3...srectangle.bmp

The snapshot is only a small portion of the screen due to the NDA.
However, it clearly shows an image button with a garish focus rectangle
around it. I'd REALLY like to eliminate the focus rectangle.

Thanks!

Nov 19 '05 #4
That looks like something the browser puts on the screen when the control
has the focus.

"Tyrant Mikey" <mi***********@ civigenics.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Actually I just uploaded a snapshot of the problem:
http://img.photobucket.com/albums/v3...srectangle.bmp

The snapshot is only a small portion of the screen due to the NDA.
However, it clearly shows an image button with a garish focus rectangle
around it. I'd REALLY like to eliminate the focus rectangle.

Thanks!


Nov 19 '05 #5
If there is a way to suppress the focus, it will most likely be part of CSS.
I'd hunt there first, especially the IE-specific CSS documentation as there
may be a custom attribute for this.

Meanwhile, while googling on "disable focus rectangle css", I stumbled
across this;
http://www.faqts.com/knowledge_base/...id/5693/fid/53
It seems to be a javascript approach to your problem.

Also see;
http://nowhere.2entwine.com/archives/000127.html
http://www.webdesignforums.net/archi...hp/t-4728.html
http://www.projectseven.com/extensions/info/remscrub/

/// M
"Tyrant Mikey" <mi***********@ civigenics.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Actually I just uploaded a snapshot of the problem:
http://img.photobucket.com/albums/v3...srectangle.bmp

The snapshot is only a small portion of the screen due to the NDA.
However, it clearly shows an image button with a garish focus rectangle
around it. I'd REALLY like to eliminate the focus rectangle.

Thanks!

Nov 19 '05 #6
On 26 Jan 2005 10:09:02 -0800, "Tyrant Mikey"
<mi***********@ civigenics.com> wrote:
Actually I just uploaded a snapshot of the problem:
http://img.photobucket.com/albums/v3...srectangle.bmp

The snapshot is only a small portion of the screen due to the NDA.
However, it clearly shows an image button with a garish focus rectangle
around it. I'd REALLY like to eliminate the focus rectangle.

Thanks!


I'd be interested to see the relevant snippet of rendered HTML from
the browsers View Sourcey whotsit.
--
Iain Norman | http://www.eliteforum.org
Nov 19 '05 #7
Oila!!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<!-- SNIPPED! -->
</HEAD>
<BODY ms_positioning= "GridLayout ">
<!-- Smart Navigation and ViewState snipped! -->
<form name="Form1" method="post" action="default page.aspx" id="Form1"
__smartNavEnabl ed="true">
<!-- Smart Navigation and ViewState snipped! -->
<!-- Other webcontrols on the page snipped! -->
<input type="image" name="btnProcee d" id="btnProceed "
src="images/button_proceed. bmp" alt="" border="0" style="Z-INDEX: 106;
LEFT: 336px; POSITION: absolute; TOP: 472px" />
</form>
</BODY>
</HTML>

Nov 19 '05 #8

Tyrant Mikey wrote:
*I don't know if this can even be done, but I'd REALLY like to
eliminate
the selection rectangle that appears around my ImageButton controls
when the user clicks on them. The buttons are on a black background,
and the selection rectangle looks like complete crap.
Any suggestions are greatly appreciated!!

Thanks! *


Hey Tyrant,
Have you found a fix for this yet. I strugled with the same thing for a
couple of hours before I tried this.

MyImageButton.A ttributes.Add(" onFocus", "this.blur( );")

I have this in the page load event of my vb code behind page, works
great!
Good Luck
Alan

--
alanl2
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #9
Nope, I hadn't found a fix for it yet. But I will give this a try. I
wonder if it interferes with the postback...

Thanks for the tip!

Nov 19 '05 #10

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

Similar topics

1
4028
by: Philippe Meunier | last post by:
Hi, I would like to know How I could draw a Dashed rectangle over everything in a container. I will use this to draw a selection rectangle (like in VB.NET Form Designer UI). And even it draws in invert colors I think, but this is not necessary for now. Can I do this with a usercontrol ? Because I know that transparency is a little tricky in VB.NET, for usercontrols.
5
3316
by: (Pete Cresswell) | last post by:
I've got a TreeView on the left of my screen. As the user navigates the tree, I load corresonding detail info into the rest of the screen. Works ok, but when the user clicks on a detail field, the TreeView's selection rectangle goes away and the user is left wondering what happened. Seems like there ought TB a way to preserve that rectangle. The optimal would be to have it go grey when the control loses focus and return to blue whe...
2
6809
by: (Pete Cresswell) | last post by:
Seems like I've been here before, but can't find anyting in Google. I've got two list boxes on a form. Seems to me like the inactive ListBox's selection rectangle should be something like gray...otherwise, the user sees two ListBoxes, both with black selection rectangles - and the user does not visually know which one he is "in". This becomes relevant if we have a keyboard-type user - they want to hit "Enter" and have something...
3
2911
by: Jeroen Ceuppens | last post by:
I need a selection tracker on a graphic Idea: left click: rectangle appear en grows when you move the mouse, again clicking is lock te rectangle How do you do that? Greetz Jeroen
5
3530
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all selected items of that listbox and display it. can anyone help? Thanks
0
1382
by: Brian Henry | last post by:
I am trying to do a owner drawn list view in detail mode, when i inherited the list view into a new custom control then turned on double buffering all the sudden the selection rectangle is the alpha channel transparent one that windows xp's shell uses... is there any way to just keep the standard dotted rectangle one? because performance is slow when the transparent rectangle region is enabled with double buffering... but i cant find a way...
11
6766
by: thom | last post by:
Hello everybody, Here is a little javascript that gives me the mouse's x and y coordinates. Now, i'd like to be able to make selection(s) rectangle(s) on a given image with it. And then, save the selection's specs. For what i've seen by now: the major problem is the DOM compliant,
0
4666
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box and also get the datakey (in my case personid) of the the rows selected. Please point me in the right direction. This is what i have so far but i have problem accessing the child gridview in the button click event Cheers, Shilpa. <asp:GridView...
5
12669
by: Jure Bogataj | last post by:
Hi all! I have a problem (performance issue) with listview. I have implemented an ItemSelectionChange on my listview and put some code in it (I build some toolbar based on selection and update info in statusbar). When selecting one item (clicking on listview) it works fast, without noticing. However if selecting multiple items with SHIFT (approx. 500 items) or selecting with mouse, for each item selected through all listview an event...
0
9589
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
10211
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, 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...
1
9994
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
9863
tracyyun
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...
1
7409
isladogs
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...
0
6673
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
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
3562
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.