1. Re: [Win32Lib] re-assign parent of control?
- Posted by "Elliott S. de Andrade" <quantum_analyst at hotmail.com> Nov 21, 2003
- 431 views
I'm a little late with this one too.... but to reassign the control to a different parent, you can use SetParent. It's not defined in Win32lib, so here it is.... constant xSetParent = registerw32Function(user32, "SetParent", {C_ULONG, C_ULONG}, C_ULONG) call it with: oldParentHandle = w32Func( xSetParent, {getHandle(child), getHandle(newParent)}) >From: Dan Moyer <DANIELMOYER at prodigy.net> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: [Win32Lib] re-assign parent of control? >Date: Tue, 18 Nov 2003 19:30:08 -0800 > > >Euman, > >Thanks, but looking at it quickly, it doesn't seem to RE-ASSIGN controls >from one parent to another? That's what I need so I can use the IDE to >position controls correctly in various groups, and then programmatically >re-assign them all to one group, where they'll overlap, and THEN select >them >in sets to be vis/invis as needed. Did I misunderstand what your example >does?? > >Dan Moyer > > >----- Original Message ----- >From: "H.W Overman" <euman at bellsouth.net> >To: <EUforum at topica.com> >Sent: Tuesday, November 18, 2003 4:11 PM >Subject: Re: [Win32Lib] re-assign parent of control? > > > > Hi Dan, > > > > Look at the demo "visibility.exw" that comes with win32lib. > > This might help you out.... > > > > Euman > > > > ----- Original Message ----- > > From: "Dan Moyer" <DANIELMOYER at prodigy.net> > > To: "EUPHORIA LIST" <EUforum at topica.com> > > Sent: Tuesday, November 18, 2003 6:59 PM > > Subject: [Win32Lib] re-assign parent of control? > > > > > > > Is there a way to programmatically re-assign the parent of a control, >for > > > instance a group control? > > > > > > For instance, I have a bunch of controls which I want to put inside a > > > relatively small group, but only some of them at a time, selectively, >and in > > > what would amount to be the same place in that group. So if I used >the >IDE, > > > they would all "overlap" one another as I create them visually, which >makes > > > it hard to deal with them. > > > > > > So I'm thinking I could create a large "dummy" window, make as many >groups > > > as I need for each individual set of controls, position the controls > > > similarly in each of those groups, and then on program activation >re-assign > > > ALL those groups to the "main" group. Then I could make each control >or >set > > > of controls selectively vis/invis as needed. > > > > > > IF I can re-assign parentage. Can I (how)? > > > > > > Dan Moyer > > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > >TOPICA - Start your own email discussion group. FREE! > >