Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Win32::GUI textfield printing array values

by ckant8 (Acolyte)
on Feb 27, 2013 at 05:04 UTC ( #1020801=perlquestion: print w/ replies, xml ) Need Help??
ckant8 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am facing problem with printing array values in textfield. Printing values in one line. Tried with split also but no use.
$telnet->print('version'); @output = $telne +t->waitfor('/#.*$/i'); @output1=split(/\n/,$ou +tput[0]); $main->AddTextfield(-text => @output1, -pos => [ 10, 250 ], -size => +[ 400, 900], -font => $font, -foreground => [0, 0, 250], );
I want the output in multi line and in a neat format. Please some one help me in this.

Comment on Win32::GUI textfield printing array values
Download Code
Re: Win32::GUI textfield printing array values
by dasgar (Deacon) on Feb 27, 2013 at 05:54 UTC
    Hi, I am facing problem with printing array values in textfield. Printing values in one line. Tried with split also but no use.

    What do you mean by "no use"? Did you get no output? Was the output just not in the right format?

    I want the output in multi line and in a neat format. Please some one help me in this.

    Can you provide info (or sample versions) on the what the expected content of the array is and what your desired output should look like?

    Based on the little bit of code that you provide, I'm guessing that you're using something like Net::Telnet to get "output" from a telnet server and then print that "output" in a part of a Win32::GUI window. Is that correct? If so, my first step of debugging would be to ensure that my code is getting what I thought that I should be getting from the telnet server. Once that was confirmed, then I would add some code to set a variable to contain the formatted string that I wanted to be displayed in the Win32::GUI window and use that to set the text field's contents to that variable's value.

    Also, are you sure that you want to use AddTextField? In my personal experience, I found it easier to create all of the elements of the window when the window is created and then later modify those elements.

      I am getting output in one line and showing boxes for new line.

      If i print the same in console..i am getting neat output.

      Hostname: xxx Hostid: xxx Release: 5.10 Kernel architecture: sun Application architecture: xxx Hardware provider: Sun_Microsystems Domain: xxxxx Kernel version: SunOS 5.10

      Please help me how to print in textfield output.

Re: Win32::GUI textfield printing array values
by Anonymous Monk on Feb 27, 2013 at 11:21 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1020801]
Approved by vinoth.ree
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-09-30 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (383 votes), past polls