cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Tab not getting high-lighted

Former Member
0 Kudos

Custom Tab not getting high-lighted

Hi,

I have added a new tab TabX in Item Master data form.

When only my add-on is running, it is working properly:

When I click on the TabX, all the controls belonging to the tab are displaying correctly.

TabX control is getting highlighted.

When my add-on runs with another add-on (DBS):

When I click on the TabX, all the controls belonging to the tab are displaying correctly.

But, TabX is not getting highlighted. Instead, some other tab(purchasing tab) is getting highlighted.

1) I'm not sure what is done by the other add-on.

2) I cannot debug my add-on when the other add-on is running. (Because we cannot get the other add-on installed in our office network. It is running only in client site.)

So, I need to 'guess' what might solve this problem.

Please help me if you know any work-arounds, so that I can highlight TabX (The normal effect of pressing a tab) in this situation.

Thank you.

Regards,

Geetha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the code, Anuj!

I will try this out and keep you updated.

Regards,

Geetha

Former Member
0 Kudos

HI,

Have you set the pane level of your tab ?

if not, get it and set it with items belong to this tab.

former_member196647
Contributor
0 Kudos

You don't set the pane level of the tab. Tab should be visible on all panes, than only, it will be always visible and clickable.

I've also encountered this similar behaviour, and for no apparent reasons. Seems like some bug to me.

Rahul

Former Member
0 Kudos

Thanks Rahul and Anuj.

Yes, as Rahul mentioned, we cannot set the pane level of a tab item other than 0.

But, it works for me when only my add-on is running...

Former Member
0 Kudos

Hi Geeta,

on FormLoad event,add the panelevel and set the panelevel of the Items.(must ber unique on that form)

OnLoadAfter(ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            AddNew_IndirectCost_Tab()

        }

private void AddNew_IndirectCost_Tab()
 {
                 oForm.DataSources.UserDataSources.Add("Folder", SAPbouiCOM.BoDataType.dt_LONG_TEXT, 100);

                oItem = (SAPbouiCOM.Item)oForm.Items.Item("36");
                oNewItem = oForm.Items.Add("oFldrCost", SAPbouiCOM.BoFormItemTypes.it_FOLDER);
                // oNewItem.AffectsFormMode = true;
                oNewItem.Top = oItem.Top;
                oNewItem.Height = oItem.Height;
                oNewItem.Width = oItem.Width;
                oNewItem.Left = oItem.Left + oItem.Width + 50;
                oFolder = (SAPbouiCOM.Folder)oNewItem.Specific;
                oFolder.DataBind.SetBound(true, "", "Folder");
                oNewItem.AffectsFormMode = false;
                oFolder.Caption = "Indirect Cost";
                oFolder.GroupWith("36");
               
                oItem = (SAPbouiCOM.Item)oForm.Items.Item("60");
                oNewItem = oForm.Items.Add("LblMacCost", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oNewItem.Top = oItem.Top;
                oNewItem.Height = oItem.Height;
                oNewItem.Width = oItem.Width + 20;
                oNewItem.Left = oItem.Left;
                *oNewItem.FromPane = 222;*      // set pane level 
                *oNewItem.ToPane = 222;*          //set panelevel
                oStaticText = (SAPbouiCOM.StaticText)oNewItem.Specific;
                oStaticText.Caption = "Actual Machine Cost";
}

on click of the your pane set the panelevel, like;

protected override void  etClickBeforeAction(ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
 {
            BubbleEvent = true;
             if (pVal.ItemUID == "oFldrCost")                    // oFldrCost-My pane,
             {
                 oForm.PaneLevel = 222;

             }
 }

The main thing is that you have to set the form's panelevel on click_before event and youe pane will be high lighted