Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. custom control

custom control

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    D2raghu
    wrote on last edited by
    #1

    well, we make a custom control . its a custom date time control . it has three textbox and a DateTimePicker . The user can either enter date through the textbox or select a date from the DateTimePicker. On the validating event of the control,the code checks if the date entered through the textbox is valid or not. if the date is not valid the event sequence is cancelled so that the control doesnot loose the focus . well the control works fine . BUT THE PROBLEM IS , when the control is used in TabedPane,it does fire validating event but doesnot retain focus.

    J 1 Reply Last reply
    0
    • D D2raghu

      well, we make a custom control . its a custom date time control . it has three textbox and a DateTimePicker . The user can either enter date through the textbox or select a date from the DateTimePicker. On the validating event of the control,the code checks if the date entered through the textbox is valid or not. if the date is not valid the event sequence is cancelled so that the control doesnot loose the focus . well the control works fine . BUT THE PROBLEM IS , when the control is used in TabedPane,it does fire validating event but doesnot retain focus.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      First, find what what's stealing the focus. See if there's some way to programmatically prevent that from receiving focus. Or, manually add focus through code when you need it.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups