PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WINDEV - Trigger Resizing a window with code?
WINDEV - Trigger Resizing a window with code?
Iniciado por guest, 17,ago. 2016 19:57 - 6 respuestas
Publicado el 17,agosto 2016 - 19:57
Hi,
is there a function in WINDEV for triggering the Resizing of a window, using WX code.
It should be able to move controls automatically, according to anchors etc ...

Steven Sitas
Publicado el 17,agosto 2016 - 20:21
Hi Steven
MyWindow..Height = ###
MyWindow..Width = ###

We use this a lot & depending on what we want to achieve (whether it's resized for the session or just to display extra data on a particular record) we either specify the size or do it as an adjustment to MyWindow..InitialHeight.

All controls which are anchored will automatically move/resize.

Cheers

David
Publicado el 17,agosto 2016 - 20:27
Hi David,
what I really want to do is HIDE a TAB that is below a TABLE and I want this TABLE to GROW until the END of the WINDOW.
So there is NO change in my WINDOWS Height/Width ..

Do you think that this code will trigger this kind of RESIZING ?

I could do :
g is int=MyWindow..Height
MyTAB..Visible=False
MyWindow..Height =g

I already have some code for this, but I want to make it more simple.
Thanks for the info, I will try this next thing in the morning ...

Steven Sitas
Publicado el 17,agosto 2016 - 20:34
Hi David,
unfortunately it didn't work

Steven Sitas
Publicado el 17,agosto 2016 - 20:45
Hmm, not sure about that as you are not physically resizing the window; I would suspect not. If it is just the table though you could resize that after hiding the tab. Not sure if this would work but if there are multiple controls maybe put all of them in an internal window and resize that??

David
Publicado el 18,agosto 2016 - 13:42
Hi Steven,

If it is WD:
Set a horizontal splitter between the table and the tab page.
Next set anchoring on the table in such a way that the table will resized if the splitter is moved.
Do the same for the tab page.

Next move the splitter in code... (Splitter..y = ...)

That should do the trick.

Cheers,

Peter Holemans
Publicado el 18,agosto 2016 - 13:56
Hi Peter,
thanks
that did the trick

Steven Sitas