From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,60c31b5757cc80b7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!news2.euro.net!newshub3.home.nl!newshub1.home.nl!home.nl!not-for-mail Date: Fri, 10 Nov 2006 19:34:36 +0100 From: Andre User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GWindows References: <31e1l2t4v3kt5h3fhsto8ujju8peob63i9@4ax.com> In-Reply-To: <31e1l2t4v3kt5h3fhsto8ujju8peob63i9@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <7aacd$4554c638$541eed9f$22617@home.nl> X-Complaints-To: abuse@home.nl Organization: www.home.nl NNTP-Posting-Host: cp538812-b.venra1.lb.home.nl (84.30.237.159) NNTP-Posting-Date: Fri, 10 Nov 2006 19:34:32 +0100 X-Trace: 7aacd4554c638f1bb483a22617 Xref: g2news2.google.com comp.lang.ada:7403 Date: 2006-11-10T19:34:36+01:00 List-Id: Yes, we are still using it in a few applications. But you are right, besides Stephen I don't see much activity on GWindows repository. The last sign of life from David over 6 months ago. Now on your actual question (yes sometimes a trigger works): To get the BN_SETFOCUS or BN_KILLFOCUS, the button needs to have the BS_NOTIFY style. I added a On_Pre_Create handler to set this style. I added the changed code: with GWindows, GWindows.Base, GWindows.Windows, GWindows.Windows.Main, GWindows.Buttons, GWindows.Edit_Boxes; use GWindows, GWindows.Base, GWindows.Windows, GWindows.Windows.Main, GWindows.Buttons, GWindows.Edit_Boxes; with Interfaces.C; with GWindows.Application; procedure TestKB is pragma Linker_Options ("-mwindows"); Main_Window : Main_Window_Type; Exit_Button : Button_Type; TestButton : Button_Type; Edit_Box : Edit_Box_Type; -- Event handlers --------- -- Exit_Button_Click procedure Exit_Button_Click ( Window : in out GWindows.Base.Base_Window_Type'Class ) is pragma Warnings (Off, Window); begin GWindows.Application.End_Application; end Exit_Button_Click; -- TestButton_Focus procedure TestButton_Focus ( Window : in out GWindows.Base.Base_Window_Type'Class ) is pragma Warnings (Off, Window); begin Text (Edit_Box, "Focus"); end TestButton_Focus; -- TestButton_Lost_Focus procedure TestButton_Lost_Focus ( Window : in out GWindows.Base.Base_Window_Type'Class ) is pragma Warnings (Off, Window); begin Text (Edit_Box, "Lost focus"); end TestButton_Lost_Focus; procedure TestButton_Pre_Create (Window : in out GWindows.Base.Base_Window_Type'Class; dwStyle : in out Interfaces.C.unsigned; dwExStyle : in out Interfaces.C.unsigned) is pragma Warnings (Off, Window); pragma Warnings (Off, dwExStyle); use type Interfaces.C.unsigned; BS_NOTIFY : constant := 16#4000#; begin dwStyle := dwStyle or BS_NOTIFY; end TestButton_Pre_Create; begin Create ( Main_Window, "Test Button", Width => 400, Height => 300 ); Keyboard_Support (Main_Window, True); Create ( Exit_Button, Main_Window, Text => "E&xit", Left => 300, Top => 225, Width => 75, Height => 34 ); On_Click_Handler (Exit_Button, Exit_Button_Click'Unrestricted_Access); On_Pre_Create_Handler (TestButton, TestButton_Pre_Create'Unrestricted_Access); Create ( TestButton, Main_Window, Text => "&Test", Left => 30, Top => 30, Width => 125, Height => 25 ); On_Focus_Handler (TestButton, TestButton_Focus'Unrestricted_Access); On_Lost_Focus_Handler (TestButton, TestButton_Lost_Focus'Unrestricted_Access); Create ( Edit_Box, Main_Window, Text => "", Left => 30, Top => 70, Width => 125, Height => 25 ); Visible (Main_Window, True); Focus (TestButton); GWindows.Application.Message_Loop; end TestKB; Andr� Fionn Mac Cumhaill wrote: > Is anybody besides me using GWindows to create Windows applications? > My last requests for assistance from the members of the GWindows > mailing list produced no responses