1. getSize()

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

new topic     » topic index » view message » categorize

2. Re: getSize()

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: getSize()

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: getSize()

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: getSize()

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu