I have a WebComboBox that is populated with several items. The box is inside of a webtabPanel that is inside a container.
The problem appears to be that the WebComboBox cannot show its entire contents unless I increase the height of the WebTabPanel. I have tried bringing the WebComboBox to the front, and the TabPanel behind but that does not work.
Is there a way to do this without increasing the height of the WebTabPanel?
BTW the underlying webpage’s height is adequate to show this.
You may need to change the overflow CSS for either the Container or the TabPanel (maybe both?)
If you can create a sample I can take a look.
If I remember correctly I create a Feature Request to allow us to define the height of popups/combos, that will help in this case to show a scrollbar without overflowing the parent(s).
Looks like WebPopupMenus use a different way to show the dropdown list than WebCombobox. WebPopupMenu is not affected by the overflow: hidden for the Tab Panel.
This is how Xojo works without any ExecuteJavascript:
This is how it looks with the ExecuteJavascript in the Shown event of the Tab Panel
or how to know where to find what needs to be put after ExecuteJavascript:
in this case I just play with the browser developer tools and see how the Xojo control is created and what is showing the browser, found that overflow: hidden limited the WebCombobox and used the Javascript to override that value.
I guess you put the ExecuteJavascript elsewhere (not in Shown event for the Tab Panel).
Edit: if your problem is somewhere else, it really help me if you upload a sample project and some pictures of what is wrong. I hope my information is helpful.
Just remove the Opening event and put the code in Shown event.
Edit: no need for cntText Opening or Shown events. The ExecuteJavascript code is specific for the WebTabPanel, will not work on other controls and even if it works may not change how the web app works.
**Edit **
One more thing… is it possible to have the drop down be scrollable instead of a huge long list? The reason to use a WebComboBox is for its built in search capabilities. But the list (countries, states etc) can be really long!
Opening occurs before the control is sent to the browser. Shown is after the DOM object has reached the browser and has been displayed. To ExecuteJavaScript on something, it must exist in the browser first. You can set framework properties on objects in Opening, but browser-side stuff (unless you’re building a custom control) needs to wait until the control has been Shown.