473,657 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Link Label Focus Issue

I have an issue in which a link label on a windows form does not draw the
focus rectangle if you programmaticall y force it to have focus via the
Control.Focus() method.

To duplicate, create a new windows app, place a button and a link label on
the form. In the button click event, place the following code,
this.linkLabel1 .Focus(). Run the app and press tab between the two controls
and you notice that the link label has the focus rectangle, but if you put
focus on the button and click the button, the focus rectangle is not drawn
on the link label even though it has focus.

I've tried several methods to force the drawing of the rectangle, including
the WM_SETFOCUS and VK_TAB api's without luck.

Any ideas on how to force the drawing of the focus rectangle? (I'm trying
to avoid using the drawrect myself).


Thanks in Advance!

Steve Bezner


Nov 15 '05 #1
0 2156

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

Similar topics

0
1416
by: Steve Bezner | last post by:
I have an issue in which a link label on a windows form does not draw the focus rectangle if you programmatically force it to have focus via the Control.Focus() method. To duplicate, create a new windows app, place a button and a link label on the form. In the button click event, place the following code, this.linkLabel1.Focus(). Run the app and press tab between the two controls and you notice that the link label has the focus...
1
1681
by: PK9 | last post by:
On my page, I want to set the focus to the top of the page (where I have a message in a label) after a button is clicked. How can I use javascript on the server side to set the focus either to a label OR a hidden input field? I do not have any textboxes on the page. The reason I need this is because I have a datagrid with potentially a LOT of records in it. The user can change these records, and click a Save button at the bottom of my...
5
8305
by: Brian Foley | last post by:
Hello, I am used to using the label tag with check boxes and radio buttons in html forms. This allows me to click on the text of the label to activate/deactivate the check box / button, rather than having to click on the (possibly small) box or button. I recently tried to assign a label to a select "drop down list", but found that when I clicked on the label text to bring it into focus, the select box was reset to the first entry. ...
5
3117
by: WindAndWaves | last post by:
Hi Gurus I have a very simple question this time. I have a continuous form with a textbox (ID number) and a label. The label has a on_click event: msgbox me.id.value If I click on the label then I get a message : 1 Now, Imagine I have the cursor on ID = 1 (the first record), then I scroll
0
1235
by: Morten Wennevik | last post by:
When the linklabel link gets focus, there is a dotted bounding box surrounding the link text until something else receives focus. Is it possible to remove this box? -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
5
16558
by: Rich Blackburn | last post by:
I am trying to create a hypertext link (text within an anchor) so that if the onlly thing the user does is to press Enter, the link will take affect and navigate properly. The link is not the first "object" on the page. Tabbing to the hypertext certainly works. Any ideas? Rich Blackburn
5
6234
by: Sharon | last post by:
Hi all, How can i set focus to a label control. lc.Focus() doesn't work. Thanks, Sharon.
2
4978
by: Greg (codepug | last post by:
I have created a LABEL, and placed it on top of a button. When I press the button, the label disappears under the button. Is there a way to get the LABEL to stay on top of the button, or reappear after the button is clicked ? I need the Label to remain an object seperate from the button. Greg
3
2752
by: muddasirmunir | last post by:
I am using the following code at mouse move event of label Now i want that when user lost focus from the label its color aging change back , on what event i want to do this code as there is no event like lost focus on label. OR how i can detect that the user moves its cursor outside label.
0
8395
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
8310
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
8826
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...
0
8605
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...
0
7330
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
4155
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...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1955
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.