Skip to Content
author's profile photo Former Member
Former Member

Can't get Checkbox to check

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;

}

}

}

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Sep 26, 2005 at 02:18 PM

    Hi Daniel,

    I also had problems with checkbox and radiobuttons.

    I use the click event, with doubleclick and now it works perfectly (why the regualr click doesn't work I don't know)

    Regards,

    Ad

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 26, 2005 at 02:18 PM

    Daniel, have you bounded your CheckBox to DataSource?

    If so, could you please show these code-lines

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      what I found was if I created a Check Box with code, it behaves well (without me having to manually set the Checked value)

      if I create the chekc box with the aid of Screen Painer then the box does not behave well.. checks but does not uncheck etc...

      hope this helps here.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.