473,574 Members | 18,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem showing focus on a button

Hi,
From reading something months ago, I've been under the impression that
saying button1.Focus() is enough to focus on the button and highlight it (the
dotted box). If this is true, I don't know what's wrong with my version, but
it doesn't work. In certain circumstances, when a button is definitely
focused on, you wouldn't be able to tell so from looking at the screen (the
dotted box isn't there so it looks like nothing's focused on). I've been
coming up with interesting ways around this, but the current situation is
proving challenging, and I can't imagine there isn't some simple way to force
the dotted line to appear. So, is there any manual way to say to highlight
this button?
Thanks so much!!!!!
Mel
Nov 28 '05 #1
1 1386
melanieab wrote:
Hi,
From reading something months ago, I've been under the impression that
saying button1.Focus() is enough to focus on the button and highlight it (the
dotted box). If this is true, I don't know what's wrong with my version, but
it doesn't work. In certain circumstances, when a button is definitely
focused on, you wouldn't be able to tell so from looking at the screen (the
dotted box isn't there so it looks like nothing's focused on). I've been
coming up with interesting ways around this, but the current situation is
proving challenging, and I can't imagine there isn't some simple way to force
the dotted line to appear. So, is there any manual way to say to highlight
this button?
Thanks so much!!!!!
Mel


In my program I have the button change color when it receives focus. To
accomplish this I made my own button class and overrode the OnFocus and
LostFocus events but that was cause I wanted it everywhere in my
program. If you just need it for one button then handle the onfocus event.

Chris
Nov 28 '05 #2

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

Similar topics

2
7727
by: Paul Thompson | last post by:
I am trying to use various javascript tools, all of which work in NN, to work in IE. Here's my latest annoyance. I get a list of all objects on a page using docContents = document.getElementsByTagName("*"); for (var i=0; i < docContents.length; i++) { if (docContents.type == 'text' ||
5
19288
by: Martin | last post by:
I have the following function in the onchange event of several text boxes. If the user enters an invalid number the alert displays. I would like to return the user to that same field after he closes the alert but setting the focus as I'm doing here doesn't do it (instead, the focus goes to the next field). Any suggestions as to hwo I can...
2
3086
by: Peter Wright | last post by:
Hi all. Hopefully this should demonstrate the problem I'm having: http://flooble.net/~pete/focus-problem-demo/ (I'm testing it in Mozilla only, but I'm not sure if it's actually a Mozilla-only problem) I'm capturing the focus and blur events for the document, updating a
2
6695
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the textbox from the Validating event. Now put the focus back on the textbox click the button bar button. Nothing happens. The form causes validation...
0
1097
by: A.J | last post by:
There is a : 1.DataGrid: Columns-->firstName,LastName,EMail,PhoneNumber 2.GroupBox: controls-->4 TextBoxes(firstName,LastName,EMail,PhoneNumber) 3.Both DataGrid and GroupBox are binded to the same datasource(Dataset) and Share the same BINDINGCONTEXT ie on clicking a record in the grid;we can see the same record in the groupbox. ...
1
5565
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web tools do not have the ability to stay active. As you switch from tool to tool the previous information is lost unless you use a Back button. I need to...
4
10099
by: Heinrich Wolf | last post by:
Hi all I have a history.back() problem with FF(2). IE works as expected, while FF does not. The multi frame website setup as a whole with a lot of frame content switching works flawlessly in both browsers. In one situation and frame I have a long scrollable list of cars offered for sale. Some list lines are linked to a separate page with...
2
5033
by: silpa | last post by:
Hi, I have placed two text boxes(server side) for Name and Age in asp.net 2.0. Their ids are txtPatientName and txtPatientAge. The validation to be done is both text boxes should not be left empty. I have written two javascript functions as follows. function isName() {
3
4239
by: jan.loucka | last post by:
Hi, I looked around for this specific problem but could not find any answer - there's few things in VB but still nothing exactly like this so I'd appreciate any help. We're writing C# WinForm application that need to "silently" use another app (called MapInfo) within itself - the intention is to use this app (which is quite sophisticated...
0
7820
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...
0
7738
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...
0
8258
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...
1
7835
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...
0
8121
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...
0
6486
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...
0
3777
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2255
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
0
1084
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.