At 04:25 AM 7/18/2003, you wrote:
Dennis,Try this just before your $MainWindow->Show(); to set the focus on your object -$ObjectName->SetFocus();
Ah, ha! So there is another undocumented function. Thanks. I repeat my earlier question: how do you find this stuff out? I have used Visual C++ so I am familiar with its properties and methods. Are all the same methods and properties supported in Win32::GUI so that I can use that documentation instead of the obviously incomplete docs (actually, in defense of the author, it does say the docs are not yet complete) that came with the package?
While that worked I am now at the next layer of the onion. When I tab to a text field, the existing text is highlighted. That is not the case with SetFocus. I would like the thing to be at least consistent. However, ideally I would like the cursor to be placed at the end of the text rather then at the beginning. Is there a way to do that?
As for the tabbing into a checkbox?! I would need to see some code.
Be careful what you wish for, you just might get it. :-)Here is the code for the 2 radio buttons. After a little more playing around I found that whichever one is checked, gets focus when tabbing. The unchecked one does not.
$window->AddRadioButton( -name=>"male", -text=>"Patriarch", -default=>1, -checked=>1, -pos=>[10,$cheight], -font=>$pt12, -tabstop=>0 ); $window->AddRadioButton( -name=>"female", -text=>"Matriarch", -default=>1, -pos=>[90,$cheight], -font=>$pt12, -tabstop=>0 );This brings up another question: I found that radio buttons cannot have the same name which, at least in VC++, is what is needed for the mutually exclusive function. These are mutually exclusive in spite of different names. What distinguishes one set of buttons from another? Suppose I wanted another independent pair?
pgp8ZgHLI73It.pgp
Description: PGP signature