Results 1 to 5 of 5

Thread: UserControl Problems

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3

    Question

    I have written a Time Picker Control - In the same vein as the Date Picker but instead of a calendar, it drops down an analogue clock on which the user can set the time by clicking the hands.

    All was fine until I tried using the control on a Modal form. Because the control uses a non-modal form to display the clock, I get an error because you can't open a non-modal form from a modal one. If I change the clock form to be non-modal, I do not get the error but I now can't click the DropDown button to close the clock. The date picker gets around this, so I would appreciate it anyone out there has any suggestions.

    Thanks

    Col.

  2. #2
    New Member
    Join Date
    Jan 2001
    Location
    Near Cardiff, Wales, UK
    Posts
    7
    Why don't you make the "clock" form a modal form ?
    The badder the better !
    Rob T

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3
    If I make the clock form modal, I do not get the error.

    However, because this form is now modal, the user cannot click the drop down button on the control (because the button is not on the clock form) and so cannot close the clock form.

    For now I have put an OK button on the drop down clock form which the user must click to close it.

    I would like the control to behave in the same way as a combo box or date picker where by clicking off the dropped down portion will close it. Also, the user could reclick the dropdown button on the control to confirm their selection. This is how it works if the clock form is non-modal but I can't replicate this behaviour on the modal form.

  4. #4
    New Member
    Join Date
    Jan 2001
    Location
    Near Cardiff, Wales, UK
    Posts
    7
    Why are you using an additional form anyway ?

    Why don't you just resize your control when the user clicks the "drop down" button. When the control is resized, you could then display your clock in it.

    I'm assuming that you've got a text box control with a small button next to it so that it looks similar to a combo box ?

    I would have thought that would be better.
    The badder the better !
    Rob T

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3
    Yes - the control does consist of a textbox with a dropdown button.

    I originally had the control resizing to display the clock as an additional part of the control but this caused problems if the control is sitting within a container (e.g. a frame). In this instance, when the user drops down the clock, the clock would disappear beneath the bottom of the frame and so would not be visible to the user. The only way to make it appear on top of the frame was to use a separate form for the clock.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width