Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - PushButton visible/invisible --> focus?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PushButton visible/invisible --> focus?

 Post Reply Post Reply
Author
Message
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: PushButton visible/invisible --> focus?
    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.
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2008 at 2:15am
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2008 at 4:16am
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
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2008 at 5:18am
Ok, thank you.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.