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. How to get previous focused control?

How to get previous focused control?

Scheduled Pinned Locked Moved C#
questionhelptutorial
2 Posts 2 Posters 0 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.
  • T Offline
    T Offline
    Tavbi
    wrote on last edited by
    #1

    Hi, I wannt to know how can I get previous focused control. My problem is when I click on panel then focus in textbox is lost. I have 5 textboxes and wannt set focus back to proper textbox. I also tried OnLeave of textbox to discover which control will get focus, but I have problem too. Any suggestion? Thank in advance, Jure

    C 1 Reply Last reply
    0
    • T Tavbi

      Hi, I wannt to know how can I get previous focused control. My problem is when I click on panel then focus in textbox is lost. I have 5 textboxes and wannt set focus back to proper textbox. I also tried OnLeave of textbox to discover which control will get focus, but I have problem too. Any suggestion? Thank in advance, Jure

      C Offline
      C Offline
      Chintan Desai
      wrote on last edited by
      #2

      panel is only a container not any control to interact with. Every ctrl has its index property.So make panel index prty after textbox property. Store previous control Id to some global variable in textbox lost focus event.After you had complete ur work on clicking on panel,just use this Id and use focus() to assign focus on that control.

      Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)

      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