user control - lost focus?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BrenB

    user control - lost focus?

    I'm trying to trap for an event in my user control so that I can
    manage the state of the user interface.

    The control is used to enter data into a database.

    The control contains a tab control with one tab containing a grid
    listing records, the other tabs are display/entry fields.

    The problem is how I handle adding a new record. If the user starts to
    enter a new record. I disable all buttons except for a cancel button
    in the control itself, but I don't disable other buttons and controls
    on the form outside of the control.

    I'm thinking that I could trap for the controls lost focus event in
    the form, but I'm getting erratic results. The event isn't raised when
    I click on another control, and sometimes it is raised when I click
    back on the user control, but not always.

    While I'm trying to figure out what's going on, I thought I'd ask for
    help here.

    Thanks, Bren
  • Harry

    #2
    Re: user control - lost focus?

    "BrenB" <GoogleGroups@e besser.comwrote in message
    news:484b781e-a28e-4b86-9ed3-8513b1a040f6@p4 9g2000hsd.googl egroups.com...
    I'm trying to trap for an event in my user control so that I can
    manage the state of the user interface.
    >
    The control is used to enter data into a database.
    >
    The control contains a tab control with one tab containing a grid
    listing records, the other tabs are display/entry fields.
    >
    The problem is how I handle adding a new record. If the user starts to
    enter a new record. I disable all buttons except for a cancel button
    in the control itself, but I don't disable other buttons and controls
    on the form outside of the control.
    >
    I'm thinking that I could trap for the controls lost focus event in
    the form, but I'm getting erratic results. The event isn't raised when
    I click on another control, and sometimes it is raised when I click
    back on the user control, but not always.
    >
    While I'm trying to figure out what's going on, I thought I'd ask for
    help here.
    >
    Thanks, Bren
    How about the controls Validate event?


    Comment

    Working...