Print Page | Close Window

How to use xtpControlRadioButton

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8899
Printed Date: 17 June 2025 at 8:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to use xtpControlRadioButton
Posted By: Rod001
Subject: How to use xtpControlRadioButton
Date 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
 
 



Replies:
Posted By: Oleg
Date 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


Posted By: Rod001
Date Posted: 26 November 2007 at 5:25pm
Oleg,
Thanks a lot. The code works great.

Rod



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net