![]() |
How to use xtpControlRadioButton |
Post Reply
|
| Author | |
Rod001
Newbie
Joined: 29 September 2006 Location: United States Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Topic: How to use xtpControlRadioButtonPosted: 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
![]() |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Rod001
Newbie
Joined: 29 September 2006 Location: United States Status: Offline Points: 25 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 November 2007 at 5:25pm |
|
Oleg,
Thanks a lot. The code works great. ![]() Rod |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |