1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Perl Tk

Discussion in 'Perl' started by ungalnanban, Feb 19, 2010.

  1. ungalnanban

    ungalnanban New Member

    Joined:
    Feb 19, 2010
    Messages:
    45
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Chennai
    Hi..

    Now I am using Perl Tk, I used the Text widget, for getting user comments or Description.

    I want to justify the text, like left, right and center,

    for me I faced some problem in handling "-justify" option in Text widget.

    It showed Bad option in "-justify" option.

    Note : I am using Perl v5.8.8.


    My Code
    Code:
    
    $txt = $mw->Text( -background =>'white',
                      -width=>400,
                      -height=>300,
                      -spacing1 => 1,
                      -justify=>'left', #This option is not working for me.
                      -selectbackground => 'skyblue',
                      -insertwidth => 5,
                      -borderwidth =>3,
                      -highlightcolor => 'blue',        ### after visit
                      -highlightbackground => 'red' ,   ### default before visit
                      -padx => 5,
                      -pady => 5,
                  )-> pack ();
    $txt->focus();
    
    
    Error Message

    Bad option `-justify' at /usr/lib/perl5/Tk/Widget.pm line 205.
    at Tk_sample.pl line 182
    malformed bucket chain in Tcl_DeleteHashEntry

    How can I solve this problem?
     
  2. gotroot

    gotroot New Member

    Joined:
    May 25, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    In my uncles garage (literally)
    try googleing the error, if no help shows up, then maybe look for a widget.pm patch. if you cant get one then look for an alternative to justify=>
     

Share This Page