Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - PtDivider childs does not resize at runtime using PtSetResource(): (4 Items)
   
PtDivider childs does not resize at runtime using PtSetResource()  
Why does not PtDivider allow to change the size/dimensions of its childs at runtime using PtSetResource()?

I wasn't able to manage resize PtText/PtButton childs in the PtDivider container using PtSetResource(). Neither of 
Pt_ARG_MIN_WIDTH,  Pt_ARG_MAX_WIDTH, Pt_ARG_WIDTH, Pt_ARG_DIM has any effect. According to documentation there is the 
Pt_CALLBACKS_ACTIVE flag in Pt_ARG_FLAGS to allow calling the drag callback (if set) when any child changes its size. 
This flag led me to idea that it's possible to change the childs size at runtime. But it seems I was wrong. Or is it 
really possible?
Re: PtDivider childs does not resize at runtime using PtSetResource()  
Please post a small example app.
Re: PtDivider childs does not resize at runtime using PtSetResource()  
I'm really sorry for the long delay.

In the meantime I've found out what causes the problem - PtDivider absolutely ignores the Pt_ARG_MIN_WIDTH flag in its 
childs. This by the way means that setting this value (either before childs first realization or anytime after) does not
 trigger a widget resize as it would if it wasn't inside of PtDivider. I need PtDivider obey this flag or another 
solution to "stop" the user-mouse-dragging at some point defined by me.

There is another caveat with setting the overall PtDivider width - see cb_resize00() in the source code for a hacky, but
 working solution.

http://pastebin.com/NnaGxRGq (compiled with -Wall -Wextra -O2 -lph -lm)
Re: PtDivider childs does not resize at runtime using PtSetResource()  
Anyone? I would be thankful for any little idea.