PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB19] How to reliably anchor controls on a Popup?
[WB19] How to reliably anchor controls on a Popup?
Iniciado por guest, 07,mar. 2015 20:38 - 11 respuestas
Publicado el 07,marzo 2015 - 20:38
I have a Popup control which was laid out and rendered perfectly. I made some minor changes and now when it renders, the layout is chaos and whatever I try I can't seem to fix it.

Does anyone have any tips on how to fix wayward positioning of controls?

Many thanks,

Michael
Publicado el 09,marzo 2015 - 00:04
Hi Michael,

Some things to try if you haven't already.
- disable anchoring on all controls.
- checking "The control can be overlaid" for all controls
- unchecking "The control can be overlaid" for all controls

Regards,
Piet
Publicado el 09,marzo 2015 - 12:33
Hi Piet,

That things you suggest don't seem to make any difference.

Does anyone know what causes page layouts to "explode" in the first place?

Thanks
Michael
Publicado el 09,marzo 2015 - 19:02
Hi Michael

I've never seen the page layout explode like you are describing...
Maybe if you provide a few screen copy, we could better understand the problem and know where it's coming from

Best regards
Publicado el 10,marzo 2015 - 13:32
Hi Fabrice,

Thank you for your offer of help. I attach 3 screen shots of the popup:

1221 is the popup as it used to render correctly.
1224 is the popup as it now renders.
1226 is the poup in the IDE.

There is nothing I can do to get back to correct rendering. Even if I delete all the controls and start again, the rendering is wild, as though some switch has been changed or something has got corrupted and now it won't behave.

Michael

[attachment 1374 2015-03-10_1221.png]
[attachment 1375 2015-03-10_1224.png]
[attachment 1376 2015-03-10_1226.png]
Publicado el 10,marzo 2015 - 14:09
Hi Michael,

Looks like your tab control is anchoring full screen, thus pushing all controls outside the tab away.

Regards,
Piet
Publicado el 10,marzo 2015 - 14:43
Hi Piet,

I completely deleted the tab control and this is what I get:

[attachment 1377 2015-03-10_1341.png]
Publicado el 10,marzo 2015 - 14:49
Hi Michael,

Weird.
You could start by regenerating the html pages
If that doesn't work:
- delete the .cpl folder
- delete the [language] folder e.g. /US
- delete the MyProject_WEB\Language and the MyProject_WEB\ es folder

If that doesn't work:
- create a new popup
- copy all controls from the old popup to the new one

Do you know exactly what the minor changes were you made?

Regards,
Piet
Publicado el 10,marzo 2015 - 15:40
Hi Michael

first thing to try is to press F6 to see each control on your page, as it is possible that you have extra ones hidden/invisible/below in the editor (as a result of an involuntary drag and drop, by example), then check that you don't have anything untoward at that level

You can also use F12 to see the list of controls

Best regards
Publicado el 10,marzo 2015 - 17:16
Thanks Piet & Fabrice.

Fabrice, there are no hidden or invisible controls.

Piet, I regenerated the html pages although nothing appeared to happen.
I deleted the .cpl folder
I deleted the [language] folder e.g. /US
I delete the MyProject_WEB\Language and the MyProject_WEB\ es folder.
The problem still existed.
I copied all controls to the clipboard.
Deleted the popup.
Create a new popup with a default name.
Renamed the popup to the same as the deleted one.
Pasted all the controls in.
Recompiled.
Same problem...see attached file.

I can't remember what change I made that caused this to happen. I guess i could go back in the SCM and recover an old copy. But it worries me that this is happening.

Michael

[attachment 1378 2015-03-10_1611.png]
Publicado el 10,marzo 2015 - 17:30
I deleted 2 buttons on the main page which had code to open 2 other popups which had earlier been deleted. Now I get this, which I guess is an improvement. But why would buttons on the main page affect the rendering of the popup? This is real voodoo.

Michael

[attachment 1379 2015-03-10_1627.png]
Publicado el 10,marzo 2015 - 18:03
Hi Michael,

This can be due to many factors which the IDE does not render.

Check if the control's margins, padding (CSS), how they should react if they overflow, if they are set to allow overlapping or not, how they align, etc. There are many small things that can cause this.

A drastic test is to re-aply a template, or remove all CSS as testing. (In fact, using Google Chrome and its code inspection tool, you can very very easily "see" what is going on and find the culprit.)

Best regards,
Alexandre Leclerc