Tabulator key problem |
Post Reply |
Author | |
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
Posted: 08 April 2008 at 10:38am |
uploads/20080408_103513_PanesFocusProbl.zip After step 5 you can use all controls on pane A if you click them, but the tabulator key doesn't work anymore. |
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Don't you see the problem or don't you understand my bad English?
We need to solve this problem. In one pane we have a form where our customers need to enter criterias. And they like to use the tabulator key to step from control to control. And in the other panes, there are results to the criterias. It's not funny if the first pane is locked (for tabulator key) after first usage. Please tell me if you need more explantations or another sample! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Oleg,
Nice workaround...
I wish it could be done with panes and forms like this
|
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
I remember, that my first solution was with picture boxes too. But due to problems you gave me the advice to use forms insted of picture boxes.
I guess it's more than one year ago, so I can't remember the reason. Maybe you changed something inside your controls? |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
The mainproblem is, that VB controls the focus on forms and controls.
You have the ActiveForm- and ActiveControl-Properties in the screen-object.
The ActiveForm-Property will be set when an WM_ACTIVATE-Message occurs.
The TAB-Keys works only in one form and can not change the ActiveForm.
So if you will change the form with TAB-Key, you must activate the pane to make the form to the ActiveForm.
Check the Tab-Key on the last control in a form (KeyDown-Event) to make the next form the activeform.
I have also the problem, that the current pane loose focus after display a messagebox or a modalform.
So i must store the activepane and reactivate it after messagebox or modalform.
The reason to use forms instead of pictureboxes are:
a) better control of activities in the form as own class and code
b) if you undock (float) a picturebox, VB may lock the entire application until you redock the picturbox.
|
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Thank you Baldur.
Point b was the reason why I changed to forms. Maybe I shouldn't allow users to undock panes... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |