|
-
Aug 30th, 2012, 06:53 AM
#1
Thread Starter
Frenzied Member
CmbTruckTyp
Hi,
I have a form called Form1, on it I have a combobox (cmbTruckTyp) that has databounded to it from a datasource. At run time the first value is highlighted in 'blue' and the cursor blinks.
What I want to achieve at runtime is, a) the blue (focus) be transparent and the cursor blinking removed.
How can I achieve this please?
Many thanks
-
Aug 30th, 2012, 07:44 AM
#2
Re: CmbTruckTyp
It sounds like you have left the DropDownStyle at the default DropDown instead of changing it to DropDownList.
-
Aug 30th, 2012, 07:53 AM
#3
Thread Starter
Frenzied Member
Re: CmbTruckTyp
Ok the cursor has been resolved.. But still it has the blue highlight (focus)..
How can I resolve this
Many thanks
-
Aug 30th, 2012, 09:14 AM
#4
Re: CmbTruckTyp
Why do you want the focus to not be blue? I'm just curious.
-
Aug 30th, 2012, 09:16 AM
#5
Thread Starter
Frenzied Member
Re: CmbTruckTyp
Thought can make it transparent instead - Mean it is on focus but no highlightment
-
Aug 30th, 2012, 09:31 AM
#6
Re: CmbTruckTyp
I don't see a purpose for removing the highlight; it shows the control has focus. I don't think you can change that short of changing the Windows theme, but I could be wrong.
-
Aug 30th, 2012, 07:41 PM
#7
Re: CmbTruckTyp
As suggested, the highlighting of the control indicates that that control has focus. By default, when a form is displayed it will be the first control in the Tab order that receives focus. If you want a different control to have focus initially then you must either change the Tab order of your controls or else explicitly set focus to that control AFTER the form has been displayed. If you don't want any control to have focus then you also do that explicitly, also after the form is displayed.
If you want to do something immediately after the form is displayed then you handle the form's Shown event. If you want to set focus to a specific control then you call that control's Select method. If you don't want any control to have focus then you set the form's ActiveControl property to Nothing.
To suggest that the control have focus but not be highlighted is a bit silly. The whole point of the highlight is as a visual cue to the user. If there's no highlight then how does the user know where the focus is? The Windows interface works in a particular way in pretty much every Windows application for a reason. Users come to expect certain behaviour and if they don't see that behaviour then the application becomes confusing. A confusing application is a bad application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|