home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,996 of 10,840   
   Steve Gerrard to The Mess   
   Re: Peculiar Control Behaviour   
   21 Nov 04 21:04:28   
   
   From: mynamehere@comcast.net   
      
   "The Mess"  wrote in message   
   news:PLcod.13937$Le1.230463@news20.bellglobal.com...   
   | Here's a simple example of my problem...   
   (snip)   
      
   | I find it very curious that it does the Initialize event, then the   
   Resize   
   | event, then the ReadProperties event.   
   |   
   | It seems that adding something to the ComboBox with AddNew does this.   
   | When it's commented out it works like the docs say: Initialize event,   
   then   
   | the ReadProperties event, then the Resize event.   
   |   
   | Am I not understanding something right, or is this not the right   
   behaviour.   
   | I guess the workaround must be to put this in the ReadProperties   
   event?   
   |   
      
   This appears to be true for any type of control on the user control.   
   Also, you don't have to actually change anything; merely inspecting a   
   property of a contained control will do it. I tried "If Line1.X1 = 7   
   Then", which also causes the Resize event to occur before the   
   ReadProperties event.   
      
   Evidently any reference to a contained control requires something to   
   happen that triggers the resize event. I am in VB6, so I am pretty sure   
   MS's response to this would be "This behavior is by design."   
      
   So, I would say, do not count on ReadProperties occuring before Resize,   
   unless you are willing to have Initialize not look at or touch anything.   
   What you do instead depends on what you need to do. By the way, normally   
   the size of the control is determined by the settings of the actual   
   control placed on a form.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca