Sponsored Content
Full Discussion: Help with Perl TK GUI!
Top Forums Shell Programming and Scripting Help with Perl TK GUI! Post 302888168 by negativ_m on Thursday 13th of February 2014 03:54:57 AM
Old 02-13-2014
Help with Perl TK GUI!

Hello Guys,

I have a problem using Perl TK.
I wanna arrange my buttons and entry's using "pack".
I would like to have my button under the "third" entry not after all my entry lines. Is using "pack" the way to go?

I am new to this language and i would appreciate some advices/solutions.

Help with Perl TK GUI!-666667png

Thank you in advance!
P.S: sorry for the lame picture Smilie
Code:
[#!/usr/local/bin/perl -w
use strict; 
use Tk;
use Tk::ProgressBar;
# Main Window
my $mw = new MainWindow;
$mw->geometry("1600x900");

#GUI Building Area
my $label = $mw ->Label (-text => "xxxx", -foreground => "blue", -font => "Arial 7") ->pack(-fill => 'x');
$label    = $mw ->Label (-text => "xxxxxxx", -foreground => "blue", -font => "Arial 12") ->pack(-fill => 'x');
$label    = $mw ->Label (-text => "xxxx", -foreground => "blue", -font => "Arial 10") ->pack (-side => 'left', -anchor => 'nw', -ipadx => '50', -fill => 'x');
$label    = $mw ->Label (-text => "xxxx", -foreground => "blue", -font => "Arial 10")->pack (-side => 'left', -anchor => 'nw', -ipadx => '150', -fill => 'x');
$label    = $mw ->Label (-text => "xxxs", -foreground => "blue", -font => "Arial 10")->pack (-side => 'left', -anchor => 'nw', -ipadx => '150', -fill => 'x');
$label    = $mw ->Label (-text => "yyyy", -foreground => "blue", -font => "Arial 10")->pack (-side => 'left', -anchor => 'nw', -ipadx => '150', -fill => 'x');
            
###############################################
#
# Creating the buttons
#
###############################################
my $dir; my $path_dir;

# Create the car folders button
my $cf = $mw->Button(
    -text    => 'Create car folders',
    -bac     => 'lightblue',
    -width   => '17', 
    -command => \&push_button)->pack(-side => 'left');

MainLoop;]

Last edited by Scott; 02-13-2014 at 06:38 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Installing GTK to develop Perl GUI's

Hi! What do I need to do to install GTK so I can use Perl GUI's in UNIX? I want to install it in my account. I am not a sys admin or anything. Thanks in advance, P. (1 Reply)
Discussion started by: pmcg
1 Replies

2. UNIX for Dummies Questions & Answers

If a is windows gui ( client), b is a unix gui ( Server for a) and c is a shell scrip

Hello all, 1) I want to have a GUI application that will call Unix shell scripts, 2) that GUI application should be able to reside on windows ( if possible) and then call Unix shell script either directly or through a server residing on unix. That is for example. If a is windows gui (... (1 Reply)
Discussion started by: hchivukula
1 Replies

3. Shell Programming and Scripting

Gui?

Do you guys work with Python? I'm just learning now but GUI seems like a way cool program it is just really wierd... I have version 4.2. you can download it for free off the site... (0 Replies)
Discussion started by: Blacidic
0 Replies

4. Shell Programming and Scripting

What to use for non-X GUI??

Has anybody ever needed to make a GUI (but really old-school style like dialog) to do some menu-based configurations... quite literally I have been bashing out code in Python using an interface class to the Dialog program in Linux... but it doesn't really have all the callback menu-driven... (0 Replies)
Discussion started by: jjinno
0 Replies

5. Shell Programming and Scripting

Interfacing a shell script with Perl Tk GUI

I want to make a GUI in perl tk where I can give some user input. This user input is the command line argument for a shell script. After giving the input parameters I want the user to press a button and the shell script should start executing. How should i interface the shell script with the GUI? (0 Replies)
Discussion started by: lassimanji
0 Replies

6. Shell Programming and Scripting

GUI selection for perl scripts

Hi, I need to develop a GUI for Perl scripts which needs frequent user interactions(like getting the inputs from the user at various stages). Can anyone suggest a language to develop a GUI which is simple to use and which can be implemented within a short time frame? Thanks, Vishwa (1 Reply)
Discussion started by: vishwa787
1 Replies

7. Shell Programming and Scripting

Running a GUI without GUI

I was wondering if it is possible to run a GUI window (say Firefox) without actually showing up the window on the desktop but still make it do its own regular stuff (like maybe do something via the command line). Sorry if its a dumb question. Thanks (3 Replies)
Discussion started by: Legend986
3 Replies

8. Shell Programming and Scripting

Perl/TK GUI

Hi, I am trying to make a GUI like attached, A list is having all values, user need to select the values from the list1. And final selected list will be list2 and it need to be in the order as per user selection. I have image for all values individually, my final output will be a merged... (1 Reply)
Discussion started by: vasanth.vadalur
1 Replies

9. Programming

Python gui or C++ gui or java gui?

python gui or c++ gui or java gui? and when to use etch one? (1 Reply)
Discussion started by: kaja
1 Replies

10. Programming

PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !

I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open()) I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
MsgBox(3)						User Contributed Perl Documentation						 MsgBox(3)

NAME
Tk::MsgBox - create and manipulate a message dialog SYNOPSIS
use Tk::MsgBox ... $d = $top->MsgBox(-title => "Title", -type => "okcancel"); ... $button = $d->Show; DESCRIPTION
MsgBox is a simple dialog with predefined buttons. OPTIONS
The options recognized by MsgBox are as follows: -icon Specify the icon of the MsgBox. Valid values are error, info, question, or warning. -type Specify the type of the MsgBox. Valid values are abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel. The type determines the buttons to be shown. -default Specify the default button. This must be one of abort, retry, ignore, ok, cancel, yes, or no, depending on the type of the MsgBox previously specified. -detail Specify text for the detail region of the MsgBox. -message Specify the message text of the MsgBox. -title Specify the title of the MsgBox. METHODS
MsgBox supports only one method as of now: Show() Displays the MsgBox until the user invokes one of the buttons. Returns the name of the button invoked. AUTHOR
Translated from Tcl/Tk by Slaven Rezic srezic@cpan.org This code is distributed under the same terms as Perl. SEE ALSO
Tk::messageBox, Tk::DialogBox, Tk::Dialog. perl v5.16.3 2014-06-10 MsgBox(3)
All times are GMT -4. The time now is 03:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy