Hi,
I have got a page with a TWebCombobox and a TWebAccordion. On selection of an item in the combobox I want certain sections of the accordion to expand automatically. Each section of the accordion is connected to a (TWeb)Panel with several other controls.
Right after startup of the application the panels of the expanded sections are not showing. I have to collapse and expand the sections by hand the first time to get the panels in view. Only after this manual intervention things start working as expected.
Any clues what might go wrong in my application? If further info is needed, please let me know. Hopefully you can help me out on this.
TIA, Jan.
Do you have a test project with which we can reproduce this here so we know all settings & all code involved?
TMSWeb_Accordion.zip (6.3 KB)
See the attached zipfile for an example.
When switching items in the combobox without ever touching the accordion, only a div with max-height 10px is displayed. Just as if the panel never was properly connected to the section. When inspecting the webpage a paragraph is shown..
Only after opening/closing the accordion sections by hand switching items in the combobox functions as expected.
Regards, Jan.
When looking at the generated javascript code, I think the first 2 lines within the if-statement
if (ASection.FControl != null) {
ASection.FControl.SetElementPosition(pas["WEBLib.Controls"].TElementPosition.epRelative);
pnl.appendChild(ASection.FControl.GetElementHandle());
ASection.FControl.SetVisible(true);
};
which are found in DoAccordionClick, should actually be placed elsewhere e.g. in method Loaded.
We traced & solved this issue. The next update will address this.