Hi gang. New to the list....

I'm having problems with the objects in a dialog box (AddButton and AddLabel
to be exact) where they lose focus. The app reads data from a file and
writes some or all of it to a RichEdit field within a main window. If a
certain menu item is selected, it should pull up this dialog box. The odd
part is that this works fine *before* I write to the RichEdit field (except
that it has not yet collected the data I am trying to display). But if I do
it during or after I have opened a file and written to the RichEdit I get
two instances of the dialog box in my system tray and neither the Label nor
the button is drawn (in either dialog box instance).

This is also true with other dialog boxes within the app.

Any ideas?

Here is the sub that is called from the menu:



sub showStats_Click
{
        &debug(1,"Just entered the showStats sub");
        my $top=10;


        $showStats = new Win32::GUI::DialogBox(
                -title  => "Filter Statistics",
                -left   => 100,
                -top    => 100,
                -width => 330,
                -height => 425,
                -name => "showStats",
                -text => "Dialog box Filter Statistics",
        );


        $showStats->AddLabel(
                -name => "showStats",
                -text => "addlabel Filter Statistics\n\n",
                -left => 5,
                -top => "$top",
        );



        $showStats->AddButton(
                -name => "GotoSHOW",
                -text => "OK", 
                -left => 120,
                -top => 370,
                -height => 22,
                -width => 75,
                -tabstop => 1,
                -ok => 1,
                -default => 1,
        );
        

        $showStats->Show();


        $top+=15;
        foreach $statCFG(@CFG)
        {
                $top+=15;
                $showStats->AddLabel(
                        -name => "showStats",
                        -text => "$statCFG : $stats{$statCFG}",
                        -left => 5,
                        -top => "$top",
                );

        }       
        
        return 0;

}

Reply via email to