$self->{bottom} = $self->{frame}->Scrolled("BrowseEdit", -height => 6, -font => "times 12", -scrollbars => 'oe', -wrap => 'word', -spacing1 => 0, -spacing2 => 0, -spacing3 => 0)-> pack(-expand => 1, -fill => 'both', -padx => 5); $self->{typing} = $self->{frame}->Label->pack(-anchor => 'w'); $self->{frame}->Button(-text => "Send", -command => [$self, "on_send"])-> pack(-pady => 3, -side => 'right', -anchor => 'center'); $self->{frame}->Button(-text => "Get Profile", -command => [$self, "on_prof"])-> pack(-pady => 3, -side => 'left', -anchor => 'center'); # WIDGET CREATION END $self->{top}->tagConfigure('self', -foreground => 'red', -font => 'times 12 bold'); $self->{top}->tagConfigure('buddy', -foreground => 'blue', -font => 'times 12 bold'); $self->{top}->tagConfigure('self_stamp', -foreground => 'red', -elide => 1, -font => 'times 9 bold'); $self->{top}->tagConfigure('buddy_stamp', -foreground => 'blue', -elide => 1, -font => 'times 9 bold'); $self->{bottom}->bind("", [$self, "on_send"]); $self->{bottom}->bind("", [$self, "destroy"]); $self->{bottom}->bind("", [$self, "on_key"]); $self->bind("", [$self, "toggle_stamps"]); $self->{top}->bind('', [ sub { $_[0]->yview('scroll', -($_[1] / 120), 'units') }, Tk::Ev('D')]); $self->{bottom}->bind('', [ sub { $_[0]->yview('scroll', -($_[1] / 120), 'units') }, Tk::Ev('D')]); # $self->bind('', [sub { # my ($width, $height) = @_; # set_option('ConvoHeight', $height); # set_option('ConvoWidth', $width); # }, Ev('w'), Ev('h')]); $self->{bottom}->configure(-background => 'white'); $self->{me} = data("me"); $self->{buddy} = $buddy; $self->{empty} = 1; $self->{last_typed} = time; $self->{typing_status} = 0; $self->update; $self->geometry("480x320"); $self->deiconify; hook("tk_seticon", -wnd => $self); $self->OnDestroy([$self, "on_destroy"]); $self->{bottom}->focus; $self->{rep_id} = $self->repeat(1000, [$self, "update_status"]);