3 Replies - 3000 Views - Last Post: 31 March 2014 - 10:48 AM

#1 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

WinForms - focus jumping from form to form

Posted 27 March 2014 - 09:01 AM

So, I'm in an attempt to hunt down why this happens. The scale of these forms is massive, so I can't exactly share the entirity of the implementation. I'm not really here to have someone solve my problem specifically, but hopefully point me in the correct direction as my google-fu is failing me today.


Here's the setup.

MdiParent Form

Multiple forms opened in MdiParent.

Use DevExpress TabbedMdiManager:
https://documentatio...MdiManagertopic

When a form is opened it has some extra controls added to it we call a 'Function Panel'. Depending on the 'mode' they opened the application in controls which style Function Panel is added. We the mode we tend to use has a container object in itself, and all the existing controls on the form must be moved into this container for its resize to work correctly.


Now the problems, of which there are 2, but I think they're related.

1) When tabbing through the controls, and reaching the end of the list based on TabIndex, instead of going back to the first control (lowest TabIndex) like WinForms is supposed to work. It instead jumps to the next form in the MdiParent.

2) When the form first opens, if I have the 'functional panel' and all its buttons with TabStop set false. And you tab off of the first focused control, focus is given to the next form in the MdiParent.


I've attempted recreating with a project that had an MdiParent, multiple child forms, using the DevX tabbedmdimanager. And I can't recreate. It loops back to the first control on the form instead of going to the next. I'm adding more and more things to it in hopes to find the problem, but like I said, the project is massive so I'm getting to the point where adding the next thing is taking large amounts of time.



What I'm asking y'all is have any of you ever seen this functionality? Where you could tab from form to form with an MdiParent?

I'm basically just looking for any hints in the direction to go. And if someone has heard of this functionality, maybe that could point me in the right direction (maybe someone wanted their forms to do this, it's not like it's bad... it's just not what we desire).

Is This A Good Question/Topic? 0
  • +

Replies To: WinForms - focus jumping from form to form

#2 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: WinForms - focus jumping from form to form

Posted 31 March 2014 - 07:23 AM

No feedback from anyone? None of you have ever heard of tabbing from form to form when you have an MdiParent?
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3467
  • View blog
  • Posts: 11,770
  • Joined: 12-December 12

Re: WinForms - focus jumping from form to form

Posted 31 March 2014 - 09:25 AM

I haven't done much with Mdi forms but this is more to do with the MdiManager than standard Mdi behaviour in my opinion.

XtraTabbedMdiManager.SetNextMdiChild Event
This cycling between pages is supposed to be implemented on CTRL+TAB/CTRL+SHIFT+TAB but it appears that is somehow also associating with just the Tab key.

If you don't require this cycling shortcut then I would:

Quote

Set the SetNextMdiChildEventArgs.Handled property to true to cancel the default cycling mechanism


Otherwise, I would investigate why the Tab key is being associated with this cycling. Failing this it may be necessary to write (messy) code to capture the Tab key when pressed.
Was This Post Helpful? 0
  • +
  • -

#4 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2533
  • View blog
  • Posts: 4,633
  • Joined: 24-September 10

Re: WinForms - focus jumping from form to form

Posted 31 March 2014 - 10:48 AM

thanks andrew, I'll look into that
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1