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,712b9f1b40092306 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 30 Mar 2005 20:45:36 -0600 From: "Steve" Newsgroups: comp.lang.ada References: <2005032513220775249%david@bottoncom> Subject: Re: Graphical output on Windows XP Date: Wed, 30 Mar 2005 18:46:53 -0800 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.22.63.157 X-Trace: sv3-9p6kGoC2EoDkmMn3hsYJ05Y39zx2SqlxfwCK/tuwUtHVvlIClhw9Atx/gt7iQxQBu0tCiEMuVN7GEjl!LkzbwN1Hdtkj+zFJF6mNIo0jJQ1ppHOa8xx2DBj2zQT9sqYwwrL5h6zzNzme X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:10173 Date: 2005-03-30T18:46:53-08:00 List-Id: You need to create an event handler to process the keys. If you look in the source file gwindows-windows.ads there is a procedure defined "On_Character_Down_Handler", which is probably what you want. I don't have an example of using the On_Character_Down_Handler, but I do have a similar example for an On_Click_Handler (for a button). Start out by defining a function to be called when a button is pressed (or in your case a character pressed)... procedure On_Button_Directory_Click(Window : in out GWindows.Base.Base_Window_Type'Class) is pragma warnings( off , Window ); dispName : GString_Unbounded; dirPath : GString_Unbounded; begin Get_Directory( Window, "Open Directory", dispName, dirPath ); end On_Button_Directory_Click; ... For my button example, I had to define the button... Button_Directory : Button_Type; Then create the button and associate the handler with the button Create( Button_Directory, Main_Window, "Select Directory", 400, 220, 100, 20 ); On_Click_Handler( Button_Directory, On_Button_Directory_Click'Access ); I hope this helps, Steve (The Duck) "Duke Luke" wrote in message news:e499e546.0503300221.154896f1@posting.google.com... > Hello, > > now i have another problem: > > i made really nice things with this gnavi-package, but i'm > not able to get messages from the keyboard (i.e i want to program a > little tetris game. everything is already working, but i cannot get > the player's commands from the keyboard while the graphic-window is > active) > > does anyone have suggestions? > is it possible to do this with the gwindows and gnavi packages or do i > have to > use other packages? > > thanks in advance! > > greetings, > Lukas Koenig