Page 1 of 1

Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 8:00 am
by GeneB
When resizing a window ( DCGETOPTIONS AUTORESIZE) using the diagonal arrow from the window's corner it locks up the entire program.
Resizing using the horizontal or vertical sides works fine.
Could this be a bug or is there a way to turn off diagonal resizing?
Thanks,
GeneB

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 10:21 am
by rdonnay
It could be a bug. I have never seen this before. I will look into it.

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 10:24 am
by rdonnay
This is my test program. It works fine for me. No lockup.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], oGroup, nRadio, oBrowse, aDir, GetOptions

aDir := Directory()
nRadio := 1

@ 0,0 dcbrowse oBrowse data aDir size 40,10

dcbrowsecol element 1 width 40 header 'File Name' parent oBrowse

@ 0,42 dcgroup oGroup size 20,10 caption 'Group box'

@ 2,1 dcradio nRadio prompt 'Radio 1' value 1 parent oGroup

@ 3,1 dcradio nRadio prompt 'Radio 2' value 2 parent oGroup

@ 4,1 dcradio nRadio prompt 'Radio 3' value 3 parent oGroup

dcgetoptions resize resizedefault DCGUI_RESIZE_AUTORESIZE

dcread gui fit title 'Resize Test' options GetOptions

return nil

proc appsys ; return

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 1:56 pm
by GeneB
Out of 40 to 50+ windows, I can make two of them lock. After investigating what they have in common, they both use DCMXPUSHBUTTON.
Those are the only two windows that use it. All of the other windows resize as they are supposed to.
You questioned me almost two years ago as to why I used DCMXPUSHBUTTON and not DCPUSHBUTTONXP.
You said you didn't write it. I used it because I had stumbled on to it in the documentation, and it worked for what I was doing.
I left it in two places because it 'wasn't broke'. Well it is 'broke'.
It doesn't actually lock up the system. If you resize smaller and then larger a few times the screen begins to rebuild so slowly it appears to be locked.
I should have listened.
'Too soon old, too late smart'.

GeneB

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 2:08 pm
by rdonnay
Wow. I forgot all about DCMXPUSHBUTTON. That was a bad decision.

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 3:22 pm
by GeneB
Perhaps a disclaimer in the Express documentation in the next release for DCMXPUSHBUTTON and DCFINDBROWSE would keep you from having to waste any more time on this in the future.

Thanks again.
GeneB

Re: Diagonally resizing a window locks up the program

Posted: Sat Feb 23, 2013 5:42 pm
by Cliff Wiernik
I use DCFINDBROWSE all the time. Actually the DC_Findbrowse() from several builds/years ago, that I modified for my own purposes to make it do what I want. No need to request changes from Roger, just do what I want myself. Essentially Roger's efforts was the starting point.

Cliff.