1. Problem with window maximise

If I showWindow(MAIN,Maximize), then my onResize[MAIN] routine is 
called before the window is actually displayed. 
 
Hence if I call isMaximised(MAIN), it returns False, and the results 
from getCtlSize(MAIN) and getClientRect (MAIN) are fairly meaningless. 
 
Am I missing something? 
Using 0.55.5 btw 
 
Pete

new topic     » topic index » view message » categorize

2. Re: Problem with window maximise

On Mon, 11 Nov 2002 11:27:00 +1100, Derek Parnell 
<ddparnell at bigpond.com> wrote: 
 
>======== The Euphoria Mailing List ========  
> 
>I cannot reproduce your problem. Here is my attempt at doing it... 
> 
 
Yes, your example works entirely different from mine. 
 
As I kind of guessed, it is not really a win32lib problem, I am 
missing some finer point... 
 
It is not a problem with 0.55.5; it is the same on 0.57.12. 
 
Being as I am at or near to my wits end, 
I have uploaded a jpeg (70K) to my web page 
 
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html 
 
which shows something odd. 
After just doing a setText({STATUSBAR,0}, text) it has shown the 
statusbar mid-screen, definitely not where it should be. 
 
I have whacked the whole caboodle ( blink up there for you to check if 
you so desire, 366K replete with trace(1) statement to get you to see 
the effect yourself. (key return about 30-40 times in the trace window 
until blanked out, alt-tab back to the debug window and it happens 
quite soon. For this I have added "without trace" liberally to 
selected portions of the code & 0.55.5 w32lib) 
 
I should re-iterate this is not precisely the problem I have, but I 
believe it clearly shows something is going wrong somewhere. 
(and despite Derek's example working perfectly, I strongly doubt I did 
anything so bad to cause this particular effect). 
 
I really would appreciate any help or suggestions anyone could give. 
 
(the quintet setBuiltInScrollRange, setScrollPositions, onresizemain, 
ormfix, & reconstructmain in editor.exw are the bane of my life; 
Never in my life have I relied so much on 160 lines of code and been 
quite so afraid of it. It confuses me, thwarts me, surprises me, 
angers me, and depresses me, and I don't know why.....) 
 
Pete

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

3. Re: Problem with window maximise

On 11 Nov 2002, at 21:58, petelomax at blueyonder.co.uk wrote:

<snip>

> Never in my life have I relied so much on 160 lines of code and been
> quite so afraid of it. It confuses me, thwarts me, surprises me,
> angers me, and depresses me, and I don't know why.....)

Because it should be easy, even to a beginner.

Kat

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

4. Re: Problem with window maximise

Pete,
I had to change a line of code in your format.ew to get the editor to run.

I changed ...

if
       equal(fileandpathname[length(fileandpathname)-11..length(fileandpathname)],

to ..

if length(fileandpathname) >= 12 and
       equal(fileandpathname[length(fileandpathname)-11..length
(fileandpathname)],


May I suggest a minor change to win32lib. It may help - but I'm not certain.

In the routine fDoResize() change these lines...

    -- resize behavior?
    VOID = invokeHandler(id, w32HResize, {wParam, cx, cy } )

    resizeWidgets( id, cx, cy ) -- resize the toolbar and statusbar, if any
    
to this...

    resizeWidgets( id, cx, cy ) -- resize the toolbar and statusbar, if any

    -- resize behavior?
    VOID = invokeHandler(id, w32HResize, {wParam, cx, cy } )
    

It could be that your handler for resizing is messing up the relocation of the
statusbar after the
window has been resized by the user.

---------
Cheers,
Derek Parnell

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

5. Re: Problem with window maximise

On Tue, 12 Nov 2002 11:13:15 +1100, Derek Parnell 
<ddparnell at bigpond.com> wrote: 
 
>======== The Euphoria Mailing List ========  
> 
>Pete, 
>I had to change a line of code in your format.ew to get the editor to run. 
Thanks, I've put that it and spotted a few other places the same 
change was needed. 
 
>May I suggest a minor change to win32lib. It may help - but I'm not certain. 
 
I managed to reproduce the problem in a cut-down test file, and that 
change fixed the test program, but not the editor. sad 
 
I have to admit defeat on the bigger problem, which is that the editor 
changes size when control returns after running an application. 
 
I'll package it up and release an official version, and make a note of 
it in the known bugs section of the manual. Having to key alt-space X 
once in a while is no real heartache, after all. 
 
>It could be that your handler for resizing is messing up the relocation of the
>statusbar after the
>window has been resized by the user. 
Um, I thought location of the statusbar depends on parent window? 
 
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu