Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: perl TK Gui rendering in windows remote desktop

by XiaoShizihou (Initiate)
on Oct 18, 2012 at 19:46 UTC ( #999807=note: print w/replies, xml ) Need Help??


in reply to perl TK Gui rendering in windows remote desktop

this is seen on Win7 and WinXP. If the GUI is started locally, then mstsc does not render the GUI completely. If the GUI is started via mstsc, then locally the GUI is not rendered.

#!/usr/local/bin/perl -w #use 5.10.0; use Tk; use strict; use warnings; use Tk::NoteBook; use Data::Dumper; # -------------------------------------------------------------------- +---------- #<+MAIN part of the program +> # -------------------------------------------------------------------- +---------- my $mw = MainWindow->new; $mw->title('MSTSC test $Rev:$'); $mw->bind( '<Key-F5>', sub { $mw->update; } ); $mw->bind( '<Escape>', sub { exit; } ); $mw->bind( '<Alt-x>', sub { exit;} ); $mw->bind( '<Alt-X>', sub { exit;} ); my $menubar = $mw->Frame()->pack( -side => 'top', -anchor => 'w', ); $menubar->Button( -text => "Exit", -command => sub { exit; } )->pack( +-side => 'right' ); $menubar->Button( -text => "Exit", -command => sub { exit; } )->pack( +-side => 'right' ); $menubar->Button( -text => "Exit", -command => sub { exit; } )->pack( +-side => 'right' ); $menubar->Button( -text => "Exit", -command => sub { exit; } )->pack( +-side => 'right' ); my $npage = $mw->NoteBook(); #->pack; # create the Main window to hold start/status buttons my $start_page = $npage->add( 'start', -label => "Start", ); my %widget_obj; my $label = "ZZ"; $widget_obj{output_tab_wid} = $npage->add( $label, -label => "$label", + ); $widget_obj{output_tab_wid}->Label( -text => "Input Window" )->pack( - +side => 'top', -anchor => 'n' ); $widget_obj{intext_wid} = $widget_obj{output_tab_wid}->Scrolled("Text" +)->pack( -side => 'top', -fill => 'both', -expand => 1, ); my $drive_frame = $start_page->Frame( -relief => 'groove', -borderwidth => 2, -label => "Special Button" )->pack( -side => 'left', -fill => 'y' ); $start_page->pack(-anchor => 'n' , -side => 'left', ); $widget_obj{'button_wid'} = $drive_frame->Button( -state => 'disabled', -text => $label, -relief => 'flat', -borderwidth => 4, -width => 15, -height => 15, -highlightthickness => 0, )->pack( -anchor => 'w' , -side => 'left', ); $npage->pack(); $mw->update; # $mw->focusmodel("active"); MainLoop; exit 0;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999807]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2016-12-08 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.