Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - PushButton Styles
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PushButton Styles

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

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Topic: PushButton Styles
    Posted: 06 November 2017 at 10:06am
How to use the PushButton to display some items when the Style property is set to :
1 - xtpButtonDropDown
2 - xtpButtonDropDownRight
3 - xtpButtonSplitDropDown


How add/select items?

I searched in the Help file but there is no information about this. 
gibra
CJ SuiteControl v: 13.x to 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 830
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2017 at 10:40am
Hello gibga,

What do you mean in "some items" ?

Regards,
 Oleksandr Lebed
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2017 at 11:53am
The DropDown event should be used to show a list of entries to choose from.
How do I add, list and select these items?
gibra
CJ SuiteControl v: 13.x to 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 830
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2017 at 6:36am
You can use our sample for example
Samples\Controls\VB\SuiteControls\frmMain.frm
   Begin VB.Menu mnuPopup 
      Caption         =   "mnuPopup"
      Visible         =   0   'False
      Begin VB.Menu mnuItem1 
         Caption         =   "Option Item 1"
      End
      Begin VB.Menu mnuItem2 
         Caption         =   "Option Item 2"
      End
      Begin VB.Menu mnuItem3 
         Caption         =   "Option Item 3"
      End
   End   

Private Sub PopupButtonMenu(btn As PushButton)
    If btn.Style = xtpButtonDropDownRight Then

        Me.PopupMenu mnuPopup, , TabControl.Left + pageButtons.Left + btn.Container.Left + _
            btn.Left + btn.Width, TabControl.Top + pageButtons.Top + btn.Container.Top + btn.Top
    Else
        Me.PopupMenu mnuPopup, , TabControl.Left + pageButtons.Left + btn.Container.Left + _
            btn.Left, TabControl.Top + pageButtons.Top + btn.Container.Top + btn.Top + btn.Height
    End If
End Sub

Private Sub btnSettings_DropDown()
    PopupButtonMenu btnSettings
End Sub

so you can just  edit  popup menu  VB.Menu
Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2017 at 4:51pm
your Samples\Controls\VB\SuiteControls\frmMain.frm doesn't work as you said.

When I press the btnSettings, the only thing that happens is that it prints in the Immediate window:

btnSettings_Click
btnSettings_MouseUp
btnSettings_MouseMove
and so on...

but no popup menu is opened.

gibra
CJ SuiteControl v: 13.x to 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 830
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2017 at 4:47am



Back to Top
gibra View Drop Down
Senior Member
Senior Member
Avatar

Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2017 at 6:30am
OK, it's all clear now.
Thank you.
gibra
CJ SuiteControl v: 13.x to 17.x
Windows 10 64bit
VS2017 - VB6.0 SP6
VS/VB 6.0 Installer v4.8 for Windows
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.109 seconds.