473,569 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UserControl focus?

Hi
I have a custom winform control based on UserControl. On this control I
create some other controls in runtime. Tehse other controls contains
RichTextBoxes. When I run the application I think my base usercontrol has
the focus because I can control scrolling my using the mouse wheel. If i
click on one of the RichTextControl s it gets focus and I can edit text. But
when I click on the base usersontrol again focus is still on the
RichTextControl . Why iis focus not returned on the base usersontrol when I
click on this?

Regards
Thorbjørn
Nov 16 '05 #1
0 1394

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

Similar topics

3
5261
by: TCORDON | last post by:
How can I make a UserControl run some javascript when it loads? this is so the control sets focus to a textbox it contains. TIA!
0
1166
by: BluDog | last post by:
Hi I have a vustom usercontrol that reacts by changing the background color when it receivess focus. However if i subsequently add another control to the usercontrol, that child control receives the focus rather than the usercontrol. I can understand why this is, i was wondering if there is any way to force the parent control to have the...
2
5195
by: Adrian Game | last post by:
Hi to all that read, I have created a usercontrol for which i want to be able to use the mouse wheel. Currently I have to make the form that the control is used in pass the mousewheel event to the control by code. Is there any way to automatically get the event for when the mouse is over the control area. Cheers and thank in addvance for...
0
1082
by: Mihaly | last post by:
I have an UserControl which contains 2 controls: 1 CheckBox and 1 DateTimePicker. I created a new DataGrigColumnStile whit thes UserControl and I put them into a DataGrid. If I use my UserControl in a Form I can move the focus of each controls with Tab key in a good order. If I use may UserControl in a DataGrid the Tab key s not working. My...
5
19650
by: Blue | last post by:
We have a custom word processing type editor built with C# and .NET 2.0 and we need to support typing in languages other than English. I want to be able to use the Windows IME to enter in text similar to how it works in a text box. For example, if I put focus on a TextBox and then switch my language on the language bar to Japanese or...
2
9574
by: Abhishek | last post by:
Hi I found lot of messages in this group on this issue but nothing actually explains it quite clearly. I've a user control with a text box and a list view. When i set the focus to the user control i want that the list view's 1st item be selected and should look in blue. However there's no way i can override on what should happen when...
2
5348
by: milund | last post by:
Hi, I am in the process of writing a custom control. In the OnMouseDown method I call this.Focus() to enable the control to receive keystrokes in OnKeyDown(). My control is hosted in a MDI form. Originally my control inherited from UserControl, but then the call to this.Focus() returned false and no keypresses were received. The I...
2
8687
by: CGatto | last post by:
Hi, I have Windows Form with several User Controls embedded within. Only one user control is visible at any one time. The user moves through the various user controls by clicking Previous and Next buttons. What I want to happen is for the individual user controls to have the ability to set focus to a specific textbox control when the...
7
14610
by: Andrus | last post by:
I have UserControls in MDI child forms containing TextBoxes and other controls. When user re-activates form, I need that Control which was last activated is activated again. Currently *first* control is activated always. To reproduce: 1. Run code. 2. Make TextBox2 as current TextBox by selecting its text
0
7614
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
8125
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
7676
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
7974
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
6284
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
5219
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...
0
3653
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...
1
2114
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
1
1221
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.