Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Control.Checked
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Control.Checked

 Post Reply Post Reply
Author
Message
Detlev Schubert View Drop Down
Groupie
Groupie


Joined: 14 August 2006
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Detlev Schubert Quote  Post ReplyReply Direct Link To This Post Topic: Control.Checked
    Posted: 28 August 2006 at 11:40am
Hello,
 
I have a menupoint with two sections, how can I do that, that I can check in the fist part max 2 Items, and in the second part only one Item. Sample:
 
   Item 1
   Item 2
   Item 3
   Item 4
   Item 5
   Item 6
   ---------
   Item 1
   Item 2
   Item 3
 
thx Detlev
  
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: 28 August 2006 at 12:11pm
Hello,
 
Execure and Update event + variable what control was checked.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Detlev Schubert View Drop Down
Groupie
Groupie


Joined: 14 August 2006
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Detlev Schubert Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2006 at 12:18pm
Hello,
 
nice anwer , but perhaps you have a sample how I can do that ?
 
thx Detlev
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: 28 August 2006 at 12:32pm
Hi,
Here code:
 
Dim Checked(1 To 3) As Long

Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Control.Id >= 100 And Control.Id <= 105) Then
        Checked(2) = Checked(1)
        Checked(1) = Control.Id
    End If

    If (Control.Id >= 120 And Control.Id <= 122) Then
        Checked(3) = Control.Id
    End If
End Sub

Private Sub CommandBars_Update(ByVal Control As XtremeCommandBars.ICommandBarControl)
   
    If (Control.Id >= 100 And Control.Id <= 105) Then
           Control.Checked = Control.Id = Checked(1) Or Control.Id = Checked(2)
    End If
   
    If (Control.Id >= 120 And Control.Id <= 122) Then
           Control.Checked = Control.Id = Checked(3)
    End If
End Sub

Private Sub Form_Load()
    Dim Popup As CommandBarPopup
    Set Popup = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "Menu")
    With Popup.CommandBar.Controls
        .Add xtpControlButton, 100, "Item 1"
        .Add xtpControlButton, 101, "Item 2"
        .Add xtpControlButton, 102, "Item 3"
        .Add xtpControlButton, 103, "Item 4"
        .Add xtpControlButton, 104, "Item 5"
        .Add xtpControlButton, 105, "Item 6"
       
        Set Control = .Add(xtpControlButton, 120, "Item 1")
        Control.BeginGroup = True
        .Add xtpControlButton, 121, "Item 2"
        .Add xtpControlButton, 122, "Item 3"
    End With
End Sub

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Detlev Schubert View Drop Down
Groupie
Groupie


Joined: 14 August 2006
Location: Germany
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Detlev Schubert Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2006 at 1:42pm
Hello oleg,
 
you know what you are ?   You are my hero, thx a lot.
 
Why is there no Description for this Control.  I is a very hard work to use this control correctly only with the symbol reference, because this great and fine control is very extensive. In VB you have only a click-event, but here are two, and which is the first event ?
 
kindly regards
Detlev
 
 
 
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.035 seconds.