From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <509071940711282247r406f619fwef5c8e85da4953f2@mail.gmail.com> Date: Thu, 29 Nov 2007 01:47:14 -0500 From: "Anthony Sorace" To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] libcontrol focus question Topicbox-Message-UUID: 0e74df44-ead3-11e9-9d60-3106f5b1d025 In my first experiment with control(2), I'm trying to get fgui to give the first entry box focus when the window is created (since in better than 90% of my cases, all that's needed is a password). I've tried a few methods, all of which basically boil down to: chanprint(cs->ctl, "%s focus 1", entry[i].val); It seems like it should be possible to explicity tell a control that it has focus, separate from the clicktotype flag, which I understand to determine how the controlset normally decides to send those messages. That's my reading of control(2)'s discussion of messages, anyway. It's entirely possible I'm missing something with the interaction between direct updates to the Controls, activate, and resizecontrolset, which is what I'm going to look at in the morning, but it seems prudent to ask if this is even possible. Can one explicitly determine which Control in a set has focus? Anthony