This seems to be the bug to me but I need to confirm.
The left aligned WebLabel control on the WebPage is shifting to the right when I click the button on this page to open WebDialog with some text. Upon closing this WebDialog the mentioned WebLabel shifts back to the left to its original position. There is nothing in the code causing it to happen. I have compared WebText control and it does not exhibit the same behavior.
I have consulted with Claude (AI) and got few suggestions but none of the proposed solutions fixed this issue.
OK, so the html text on the WebDialog interferes with the alignment of the WebLabel on the underlying WebPage2. Interesting. I am giving this to Claude and will see what comes out of it.
Worth updating the forum thread with this, since it reframes the whole issue for Alberto: it's not a WebDialog/WebLabel layout bug at all, it's that HtmlViewerInfo.LoadHTML's injected <style> block isn't scoped to that HtmlViewer's content — bare-tag selectors like p{...} are leaking out and applying page-wide. That's arguably the more interesting bug to report, since anyone using LoadHTML with unscoped CSS could be silently clobbering styles elsewhere on the same page, not just alignment on a label.
Great, thank you for your quick solution. The sample project now no longer shows the shifting, I will use this fix in the real production project, thanks again.