[graphic-forms-devel] Dialog focus

Ken Perry kperry at blinksoft.com
Sat Sep 8 05:53:48 UTC 2007


 
I didn't even realize it didn't keep the correct focus when the application
loses focus till you just wrote this.  I can tell you this is not how Win32
normally works.  If you would like I can send you both an EXE and an ASM
win32 program that does the same thing as my lisp program which I am writing
in your graphic-forms library.  That way you could test how a pure win32
application works against your library if you like.  If you want I can send
my newest lisp file, my ASM file, and the EXE of the ASM file.  If you don't
trust that I am sending you just the simple program and I might not in your
place I can also zip up the GOASM compiler and linker in the directory so
you can make the ASM file for safety sake.  I have a simple bat file that
makes it so you don't have to fight learning to use the asm compiler and
linker if you haven't used GoAsm before.


As for fixing it you could make a global *current-control-focused* or
something like it so that when it returns and the activated event is called
you can reset the focus.

Well let me know if you would like to see the comparison and I will zip it
all up.

Ken  
-----Original Message-----
From: graphic-forms-devel-bounces at common-lisp.net
[mailto:graphic-forms-devel-bounces at common-lisp.net] On Behalf Of Jack Unrue
Sent: Friday, September 07, 2007 9:56 PM
To: graphic-forms-devel at common-lisp.net
Subject: Re: [graphic-forms-devel] Dialog focus

On 9/7/07, Ken Perry <whistler at blinksoft.com> wrote:
>
> I have just looked through the documentation for a way to set the 
> initial focused control but have not found one.  I could create a 
> focus event that said if the dlg gets focus then focus the one I want 
> but I am wondering if there is another way like for example a 
> :default-focus for the dlg?  I add a listbox to the dialog then an 
> edit box and then 3 buttons.  It seems no matter if I add the edit box 
> first or last or in the middle some where The dialog when shown  
> always seems to focus the list box which I don't understand why that is.

Hi Ken. Try calling gfw:give-focus on the desired control in your
initialization of the dialog.

One thing that I haven't decided whether I'm happy about is the behavior
that occurs when any control has the focus and one switches to another
window and then back. I find that I have to manually set the focus back,
when one might expect that when the window is made active again, that the
control that previously had focus would remember that state.
I need to do some research and see if this is just normal Win32 behavior,
and if it is, then I might think about providing some mechanism to handle
this automatically. Your input is welcome.

--
Jack Unrue
_______________________________________________
graphic-forms-devel mailing list
graphic-forms-devel at common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/graphic-forms-devel




More information about the Graphic-forms-devel mailing list