fiogf49gjkf0d Hi everybody!
My question is: can I add tabs to MainView opened modaly (with ShowModal method)? SLX 6.2
I'd tried different ways:
1) Get MV object by Application.MainViews.Add, add tabs to object and then call ShowModal. Result - form opens modaly, tabs pane shows but there are NO tabs.
Set oMainView = Application.MainViews.Add ( FormName, 0, False ) oMainView.Tabs.Add "Account:Details" oMainView.ShowModal
2) In opening form in AXFormOpen method loop through Application.MainViews.Item(i), get my form as MV object, add tab. Result the same - form opens modaly, tabs pane shows but there are NO tabs.
dim i for i=0 to Application.MainViews.Count-1 if Application.MainViews.Item(i).DetailsView.Name="XYZ" then Application.MainViews.Item(i).Tabs.Add "Account:Details" end if next
3) Get MV object by Application.MainViews.Add, put this object to GlobalInfo, get object from GlobalInfo in AXFormOpen opening form method and tried to add tab - get unexpected error on line with "oMainView.Tabs.Add" - seems like we cannot pass MV object by GlobalInfo.
Set oMainView = Application.MainViews.Add ( FormName, 0, False ) Application.GlobalInfo.Add "Test_MVwTabs_Modal", oMainView oMainView.ShowModal ... set oMainView = Application.GlobalInfo.Item ( "Test_MVwTabs_Modal" ) oMainView.Tabs.Add "Account:Details"
It seems like we can add tabs to MV only if it is opened with WindowStyle=1, but in this case we cannot open it modaly... May be someone has another opinion??
The whole task is the following: I have grid with records that represent Accounts and Contacts. If i click on Account - should appear account detail form, if on Contact - the contact detail form.
I wanted to put my grid on MainView DetailView, add to Tabs Account and Contact details forms and switch tabs on grid's OnClick event. But got SLX limitation described above. |