From: Andre on 10 Nov 2006 13:34 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
From: Yves Bailly on 10 Nov 2006 13:38 Alex R. Mosteo wrote: > Are you aware of this qtada binding: > http://freehost07.websamba.com/guibuilder/ Yes I am, but this binding is for Qt3, I wanted one for Qt4. Also it's Ada95, not Ada2005, and I wanted to pratice Ada2005. Last note, for various reasons I don't really like the way it is structured, I wanted to have a type hierarchy in Ada reflecting exactly the type hierarchy in C++. > In any case keep us informed of your progress. Of course :-) Regards, -- (o< | Yves Bailly : http://kafka-fr.net | -o) //\ | Linux Dijon : http://www.coagul.org | //\ \_/ | | \_/`
From: Michael Bode on 10 Nov 2006 16:14 "Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes: > Though GTK+ performs quite poorly on Windows platform. How? For me it works quite well. > And overall, when its documentation tells you that you fundamentally > cannot save and restore the position of a window, what could you > say? Get toplevel window position from a widget: declare Gwin : Gdk.Window.Gdk_Window; X, Y : Glib.Gint; begin Gwin := Gtk.Widget.Get_Window (Get_Toplevel (Widget)); Gdk.Window.Get_Position (Gwin, X, Y); end; Set toplevel position: Gtk.Widget.Set_UPosition (Widget, X, Y); -- Michael Bode
From: Pascal Obry on 10 Nov 2006 17:40 Dmitry A. Kazakov a ?crit : > Though GTK+ performs quite poorly on Windows platform. And overall, when GPS manages to work pretty well on Windows and it is using GtkAda. It uses to perform poorly, but things have improved a lot since a year or so. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
From: Fionn Mac Cumhaill on 11 Nov 2006 00:23 On Fri, 10 Nov 2006 19:34:36 +0100, Andre <avsaway(a)hotmail.com> wrote: > >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, > .... code sample snipped ... Works perfectly. Many thanks. I expect that this technique will also solve a problem that I am having with radio button; the GWindows version of a radio button is also lacking a BS_NOTIFY style.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Problem creating bindings - please help Next: Ada.Containers.Doubly_Linked_Lists |