cancel
Showing results for 
Search instead for 
Did you mean: 

Hide form field

former_member275826
Participant
0 Kudos

Dear all,

I want to hide form field by placing other control on it.

Plz check my code:

oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                             SAPbouiCOM.Item oItem = oForm.Items.Item("30");

                            SAPbouiCOM.Item oNewItem = null;

                            oNewItem = oForm.Items.Add("cmb_SE", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);

                            oNewItem.Left = oItem.Left;

                            oNewItem.Top = oItem.Top;

                           

                            oNewItem.Width = 3 * oItem.Width;

                            oCombo = (SAPbouiCOM.ComboBox)oForm.Items.Item("cmb_SE").Specific;

                            oItem = oForm.Items.Item("cmb_SE");

                            oItem.Visible = false;

But the new created control is not overlaping existing control.

I have also use the same top of existing field

Accepted Solutions (0)

Answers (3)

Answers (3)

pedro_magueija
Active Contributor
0 Kudos

Hi Pravin,

Sorry to barge in, but have you tried to set the item to a different PaneLevel?

I haven't tried it with system items.

oItem.PaneFrom = 99;

oItem.PaneTo = 99;

Good luck,

Best regards,

Pedro Magueija

Former Member
0 Kudos

Hai,

             you may try this,

                     

oItem = oForm.Items.Item("30"); 

oItem.width=0

oItem.Height=0

Regards,

K Sakthivel

Former Member
0 Kudos

Hi Pravin,

Change your last line with following ?

oItem = oForm.Items.Item("30"); 

oItem.Visible = false;

May I know is this your own form or you are working on a system form ??

Regards

former_member275826
Participant
0 Kudos

Hi,

It is system form.

oItem = oForm.Items.Item("30"); 

oItem.Visible = false;

I have removed the above lines

But no success.

edy_simon
Active Contributor
0 Kudos

Hi,

Your last 2 lines are hiding the new item not the item uid 30.

Regards,

Edy

former_member275826
Participant
0 Kudos

Thanx to both of you for your replies.

This Sales analysis report form.

I have written above code at form load.

On Sales employee tab click i am making that combo visible.

edy_simon
Active Contributor
0 Kudos

Hi,

In that case, instead of setting the system item to visible =false,

You might try setting the left/top property to a very large number, that it is not visible by user.

Regards,

Edy