1. getSize()
- Posted by Derek Parnell <derekp at solace.com.au> Sep 29, 2000
- 540 views
Hi all, the win32lib function getSize() returns {Left, Top, Bottom, Right} for windows, and {Left, Top, Width, Height} for other controls. Does anybody want this changed so that it is consistent for all types of controls? And if so, what do you want returned? ----- cheers, Derek Parnell
2. Re: getSize()
- Posted by Brian Broker <bkb at CNW.COM> Sep 29, 2000
- 543 views
On Fri, 29 Sep 2000 17:26:13 +1100, Derek Parnell wrote: >Hi all, >the win32lib function getSize() returns {Left, Top, Bottom, Right} for >windows, and {Left, Top, Width, Height} for other controls. Does anybody >want this changed so that it is consistent for all types of controls? And if >so, what do you want returned? Doesn't really matter to me. I find myself using getExtent more than getSize. But I would like to know why there's a discrepancy in the behavior of this function in the first place. Where does the author stand on this issue? But if I were forced to vote, I'd probably go with the latter since this is how we specify size when we create our windows and controls... -- Brian
3. Re: getSize()
- Posted by David Cuny <dcuny at LANSET.COM> Sep 29, 2000
- 536 views
Derek Parnell wrote: >the win32lib function getSize() returns {Left, Top, Bottom, Right} > for windows, and {Left, Top, Width, Height} for other controls. Sorry about that. This whole thing is a bit of a mess. The *proper* thing to do is rename a number of routines. setPosition becomes setPenTo or setPenPosition setPosition is used to move windows and controls getPosition returns the first two values of setSize getExtent becomes getSize setSize remains the same The other option is to use get/setExtent instead of get/setSize, which would probably break less code. In any event, I should have been cleared up a long time ago. -- David Cuny
4. Re: getSize()
- Posted by Kat <gertie at PELL.NET> Sep 29, 2000
- 535 views
On 29 Sep 2000, at 4:42, Brian Broker wrote: > On Fri, 29 Sep 2000 17:26:13 +1100, Derek Parnell wrote: > > >Hi all, > >the win32lib function getSize() returns {Left, Top, Bottom, Right} for > >windows, and {Left, Top, Width, Height} for other controls. Does anybody > >want this changed so that it is consistent for all types of controls? And > if > >so, what do you want returned? > > Doesn't really matter to me. I find myself using getExtent more than > getSize. But I would like to know why there's a discrepancy in the > behavior of this function in the first place. Where does the author stand > on this issue? > > But if I were forced to vote, I'd probably go with the latter since this is > how we specify size when we create our windows and controls... Speaking just as an outsider of this thread, one way to do it without breaking anything would be to declare, in win32lib, the first parameter recieved by getsize() as object, then test if it is a sequence, and if it is "pen" then return pen things, and if it's "window" then return window things, etc, etc, and if it's whatever is normally passed now, then return whatever is returned now? If using the first parm is not feasable, then test for parm count, if it is one more than is currently passed to getsize(), then the first one is the one defining what is wanted, like "pen", "menu", "window", or "etc#",, or for that matter, a webpage size.... Kat
5. Re: getSize()
- Posted by "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV> Sep 29, 2000
- 496 views
Kat wrote: > and if it is "pen" then return pen things Good plan, but the "pen" is implemented much like the "font" - as an attribute of the window, not as an independant object. I figured that it would be easier to hide these details from the user, which is something that VB does as well. -- David Cuny