From: Pavel P. <stu...@ya...> - 2003-08-15 21:01:47
|
Hello perl-win32-gui-users, I have a small perl script, and I have a problem with content of AxWindow. When I click a button my script downloads and parses html and I want to fill a window with new content. I have tried some ways, but without success. The new content appent to old html or not visible at all. Actually I need to write my generated HTML in variable (e.g. $html_1, $html_2, ...) and show it in window. And this in sub Button_Click. Or how can I get return (@_[0])from Button_Click with new HTML-Code? Can I define a global variable in Button_Click subprogramme ? As workaround I will to write html-stuff down in local temp file and then load it in window. But this is not good. ... ... $Window = new Win32::GUI::Window ( -size => [400, 400], -name => "Window", ); $Window->AddButton( -text => "Start", -name => "Start", -pos =>[10,20], -size =>[90,20], ); $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [10, 50], -size => [250, 250], -control => "Shell.Explorer.2", ); $OLEControl = $Control->GetOLE(); $OLEControl->Navigate("about:blank"); # Clear control $Window->Show(); Win32::GUI::Dialog(); ... ... sub Start_Click { $html = int rand(100); $OLEControl = $Control->GetOLE(); $OLEControl->{Document}->write("$html"); # Write Html }; -- Best regards, Pavel Prostine mailto:stu...@ya... |