PushButton visible/invisible --> focus? |
Post Reply |
Author | |
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
Posted: 14 April 2008 at 2:07am |
In this sample there are two buttons. A Microsoft CommandButton and a CodeJock PushButton. This buttons are only visible if item "B" in the ComboBox is selected. Now try to use this form ONLY BY KEYBOARD. If you change ComboBox 2 with "cursor up" and "cursor down" and the PushButton gets visible, then the focus goes to the button. That doesn't happen with the Microsoft CommandButton. This behavior is annoying. |
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Agree. But afraid its internal routines of Visual Basic. our Pushbutton is ActiveX control standard is builtin button.
Here workaround:
Option Explicit
Private Sub Combo1_Click()
Command1.Visible = Combo1.ListIndex = 1
End Sub
Private Sub Combo2_Click()
If (Combo2.ListIndex = 1) Then
PushButton1.Left = PushButton1.Left + 7000 PushButton1.Enabled = True Else If PushButton1.Left > 0 Then PushButton1.Left = PushButton1.Left - 7000 PushButton1.Enabled = False End If End Sub
Private Sub Form_Load()
Combo1.AddItem "A"
Combo1.AddItem "B" Combo1.AddItem "C" Combo1.AddItem "D" Combo1.AddItem "E" Combo2.AddItem "A"
Combo2.AddItem "B" Combo2.AddItem "C" Combo2.AddItem "D" Combo2.AddItem "E" Combo2_Click
End Sub
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Ok, thank you.
|
|
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 |