예제 #1
0
        private void AddItemsToPVForm()
        {
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "OptBtnDS", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS1", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS2", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS3", BoDataType.dt_SHORT_TEXT, 1);

            //adcionar check box ao folder

            this.oItem = this.oFormPV.Items.Item("126");

            for (int i = 1; i <= 3; i++)
            {
                this.oCheckBox = UIHelper.AddCheckBoxAoFormulario(
                    this.oFormPV
                    , "CheckBox" + i.ToString()
                    , oItem.Left
                    , 100
                    , this.oItem.Top + (i - 1) * 19
                    , 19
                    , "Check Box" + i.ToString()
                    , true
                    , 5
                    , 5
                    );
                this.oCheckBox.DataBind.SetBound(true, "", "CheckDS" + i.ToString());
            }

            this.oItem = this.oFormPV.Items.Item("44");
            for (int i = 1; i <= 3; i++)
            {
                //this.oNewItem = this.oFormPV.Items.Add("OptBtn" + i.ToString(), BoFormItemTypes.it_OPTION_BUTTON);
                //this.oNewItem.Left = oItem.Left;
                //this.oNewItem.Width = 100;
                //this.oNewItem.Top = this.oItem.Top + (i - 1) * 19;
                //this.oNewItem.Height = 19;

                //this.oNewItem.FromPane = 5;
                //this.oNewItem.ToPane = 5;


                //this.oOptionBtn = (SAPbouiCOM.OptionBtn)oNewItem.Specific;
                //this.oOptionBtn.Caption = "Option Button" + i.ToString();
                //if (i > 1)
                //{
                //    oOptionBtn.GroupWith("OptBtn" + Convert.ToString(i - 1));

                //}

                this.oOptionBtn = UIHelper.AddOptionButtonAoFormulario(
                    this.oFormPV
                    , "OptBtn" + i.ToString()
                    , oItem.Left
                    , 100
                    , this.oItem.Top + (i - 1) * 19
                    , 19
                    , "OptBtn" + i.ToString()
                    , (i > 1) ? "OptBtn" + Convert.ToString(i - 1) : ""
                    , true
                    , 5
                    , 5
                    );


                this.oOptionBtn.DataBind.SetBound(true, "", "oPTBtnDS");
            }
        }