Re: Changes in Win32lib v0.54
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 28, 2000
- 475 views
----- Original Message ----- From: "Dan B Moyer" <DANMOYER at PRODIGY.NET> > Re: the code breaking in .54, in particular the "cross" re-naming of > getSize() and getExtent(), might it be possible to make a "break-fixer" > program that could be run on programs to change any instance of > "wrong-with-54" to "now-ok-with-54"? Yeah, after hand-changing all the demo programs I could agree. I'll try to knock up a quick and dirty conversion program. > Re: create() etc. enhancements allowing use of % dimensions, does this mean > that *every* use of create() etc is now broken??? No. The create() and other routines still accept the same parameters as they do now. Here's an example ... myWin = create(Window, "TEST", 0, 20, -- The left edge is at pixel #20 across 30, -- The top edge is at pixel #30 down 400, -- The width is exactly 400 pixels 300, -- The height is 300 pixels 0) Btn1 = create(MleText, "", myWin, 0.25, -- Left edge is 25% of the window width 25, -- Top edge is 25 pixels down {-1, -10}, -- width extends to right edge less 10 pixels 0.5, -- height is 50% of window height 0) when this really comes in to its fore is on a parent resize event. procedure onResize_myWindow(...) setPosition(Btn1, 0.25, -- Left edge is 25% of the window width 25, -- Top edge is 25 pixels down {-1, -10}, -- width extends to right edge less 10 pixels 0.5 -- height is 50% of window height ) end procedure ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)