on 12-27-2007 11:08 AM
Hi,
I added a checkbox to a form with the code below:
oItem = oForm.Items.Add("cbGroup", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
oItem.Top = 355
oItem.Left = 25
Dim loCheckBox As SAPbouiCOM.CheckBox
loCheckBox = oItem.Specific
loCheckBox.Checked = True
loCheckBox.Caption = "Group"
The checkbox appears fine on my form, I even can execute code when the click event is triggert.
The problem is dat the checkbox never stays check when I want to, it always stays false.
Anyone has a solution?
regards,
Bas Dekker
Hi Adele,
Thank you for your example, this solved my problem!
I looked into the help which comes with the SDK, but didn't read there I had to bind it.
Thnaks a lot again.
regards,
Bas Dekker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bas,
In order for a check box to stay checked you have to bind it to a data source. This data source could be a user data source or a DB data source. Let's say you want to bind it to a user data source you could add the code below to your code:
oForm.DataSources.UserDataSources.Add("udGroup", dt_SHORT_TEXT, 1)
loCheckBox.ValOn = "Y"
loCheckBox.ValOff = "N"
loCheckBox.DataBind.SetBound(True, "", "udGroup")
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.