Results 1 to 7 of 7

Thread: CmbTruckTyp

  1. #1
    Fanatic Member
    Join Date
    Feb 09
    Posts
    819

    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

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,859

    Re: CmbTruckTyp

    It sounds like you have left the DropDownStyle at the default DropDown instead of changing it to DropDownList.

  3. #3
    Fanatic Member
    Join Date
    Feb 09
    Posts
    819

    Re: CmbTruckTyp

    Ok the cursor has been resolved.. But still it has the blue highlight (focus)..

    How can I resolve this

    Many thanks

  4. #4
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 08
    Location
    On the Internet
    Posts
    2,866

    Re: CmbTruckTyp

    Why do you want the focus to not be blue? I'm just curious.

  5. #5
    Fanatic Member
    Join Date
    Feb 09
    Posts
    819

    Re: CmbTruckTyp

    Thought can make it transparent instead - Mean it is on focus but no highlightment

  6. #6
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 08
    Location
    On the Internet
    Posts
    2,866

    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.

  7. #7
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,859

    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
  •