Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How to use xtpControlRadioButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use xtpControlRadioButton

 Post Reply Post Reply
Author
Message
Rod001 View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rod001 Quote  Post ReplyReply Direct Link To This Post Topic: How to use xtpControlRadioButton
    Posted: 26 November 2007 at 12:07pm
Hi,
 
I am using the code below to create RadioButton controls in a VB app with CJ ver. 11.2.0.
 
I am not sure (if at all) about how to handle the events CommandBars_Execute and/or CommandBars_Update.
 
How do I turn on and off the button?
 
See below.
 
Thank you,
Rod
 
 
Set SummaryBar = CommandBars.Add("Summary", xtpBarTop)
    With SummaryBar.Controls
          Set Control = .Add(xtpControlButton, ID_PRINT, "Print"): Control.Style = xtpButtonIcon
          Set Control = .Add(xtpControlButton, ID_CLEAR, "Clear"): Control.Style = xtpButtonIconAndCaption: Control.BeginGroup = True
          Set Control = .Add(xtpControlRadioButton, ID_SUMMARY_90, "90 Days"): Control.BeginGroup = True
          Set Control = .Add(xtpControlRadioButton, ID_SUMMARY_60, "60 Days")
          Set Control = .Add(xtpControlRadioButton, ID_SUMMARY_30, "30 Days")
        Set Control = .Add(xtpControlCheckBox, ID_APPEND, "Append Summary Data"): Control.Style = xtpButtonIconAndCaption: Control.BeginGroup = True
     End With
 
 
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: 26 November 2007 at 1:55pm
Hi,
Add some variable for selected SUMMARY
dim SelectedSummary as long and set it in Execute/Update  control in Update event:
 
CommandBars_Execut
...
Case ID_SUMMARY_90
  SelectedSummary = 90
 
...
 
CommandBars_Update
...
Case ID_SUMMARY_90
    Control.Checked = SelectedSummary  = 90
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Rod001 View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rod001 Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2007 at 5:25pm
Oleg,
Thanks a lot. The code works great.

Rod
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.063 seconds.