PaulS
(PaulS)
March 18, 2022, 10:52am
1
With the program I’m creating, it is possible to show various webpages in a TabPanel.
Works fine with API1.
But after I converted the program to API2 showing webpages in a TabPanel no longer works.
The whole TabPanel is invisible.
This problem is in macOS and in Windows.
<https://xojo.com/issue/68039 >
I hope that Xojo will look into this case and solve it asap because this will prevent me moving to API2.
Apparently, there is a bug in the TabPanel with recent Xojo versions. Read the Feedback here:
They’re green because Xojo uses a declare to change the local accent color.
If you select one in system preferences apps can’t override your accent color.
The title is a bit misleading (IMHO/No offense), the bug seems to be the one you reach.
Looks fine. You might want to try the tester channel.
A workaround might be to make a DesktopContainer to fill the PagePanel page. Put the HTMLViewer on the Container.
I already had this problem some time ago, before the API2 controls.
AlbertoD
(AlbertoD)
March 18, 2022, 6:47pm
5
If you click ‘New Tab’ and then ‘Close Tab’ do you see something?
PaulS
(PaulS)
March 18, 2022, 7:01pm
6
@TimStreater
The HTMLViewer is already on a container.
@AlbertoD
When I click New tab nothing happens, but when I click close tab all of a sudden the TabPanel (with the webpages) is shown.
AlbertoD
(AlbertoD)
March 18, 2022, 8:13pm
7
In AddNewTab change your code:
//BrowserTabPanel.PanelIndex = page
BrowserTabPanel.SelectedPanelIndex = page
in CloseTab comment this line
//BrowserTabPanel.PanelIndex = BrowserTabPanel.SelectedPanelIndex - 1
at least this works on mac.
Note: you will need to add the Windows specific code for CloseTab (I think)
PaulS
(PaulS)
March 18, 2022, 9:06pm
8
@AlbertoD
Thank you!
You have found what the problem was.
I used 2 times PanelIndex instead of SelectedPanelIndex
After I had replaced both occurrences of PanelIndex with SelectedPanelIndex, the webpages are shown correctly.
3 Likes
DerkJ
(DerkJ)
March 18, 2022, 9:23pm
9
The naming is a bit misleading, PanelIndex could have been named some thing like ParentPanelIndex.