Skip to Content
0
Former Member
Sep 26, 2005 at 02:06 PM

Can't get Checkbox to check

53 Views

Hi I am having trying to get my checkbox to check...

I can get a reference to the checkbox object, change the display text etc with the object, but when I set the checked state to true it always remains unchecked???

Below is my code:

public override void CatchItemEvent(string FormUid, ref SAPbouiCOM.ItemEvent ItmEvent, out bool BubbleEvent)

{

BubbleEvent = true;

if(FormUid == "frmBulkPriceUpdate" && !ItmEvent.BeforeAction && ItmEvent.EventType == BoEventTypes.et_CLICK)

{

SAPbouiCOM.CheckBox cbQuotes = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbQuotes").Specific;

SAPbouiCOM.CheckBox cbOrders = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbOrders").Specific;

SAPbouiCOM.EditText txtDate = (SAPbouiCOM.EditText)_SboForm.Items.Item("txtDate").Specific;

switch(ItmEvent.ItemUID)

{

case "cbOrders" :

cbOrders.Checked = true;

SboApplication.SetStatusBarMessage(cbOrders.Checked.ToString(), BoMessageTime.bmtShort, false);

break;

case "cbQuotes" :

cbQuotes.Checked = true;

break;

case "butLaunch" :

int confirm = _SboApplication.MessageBox(

"Are you sure you want to run the Automatic Update?",

0,

"OK",

"Cancel",

"");

if(confirm == 1)

UpdatePrices(true, true, txtDate.String);

break;

}

}

}