Schrift
[thread]4901[/thread]

Scrollbar unten andocken



<< |< 1 2 >| >> 11 Einträge, 2 Seiten
Froschpopo
 2005-04-03 01:38
#43142 #43142
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
hab hier nen Scroll-Frame:
Code: (dl )
1
2
3
4
5
my $pane = $config{MainWindow}->Scrolled(
"Pane", -scrollbars => 'e',
-bg => 'white',
-width=>$config{MainWidth},
-height=>360)->pack();

Wie kann ich es machen, dass der Scrollbalken immer nach unten geht? Neue Nachrichten in dem Frame kommen immer unten dran, deshalb soll das Teil auch immer nach unten Scrollen
Dubu
 2005-04-03 03:49
#43143 #43143
User since
2003-08-04
2145 Artikel
ModeratorIn + EditorIn

user image
Code: (dl )
$pane->yview(moveto => 1)

oder so aehnlich. Schau lieber noch mal in perldoc Tk::Pane nach.
Froschpopo
 2005-04-03 04:32
#43144 #43144
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
also -moveto => 1 klappt nicht

*$pane*->yview
   Returns a list containing two elements, both of which are real
   fractions between 0 and 1. The first element gives the position of
   the top of the window, relative to the Pane as a whole (0.5 means it
   is halfway through the Pane, for example). The second element gives
   the position of the bottom of the window, relative to the Pane as a
   whole.


*$pane*->yview
Returns a list containing two elements, both of which are real
fractions between 0 and 1. The first element gives the position of
the top of the window, relative to the Pane as a whole (0.5 means it
is halfway through the Pane, for example). The second element gives
the position of the bottom of the window, relative to the Pane as a
whole.


was soll ich jetzt nehmen?\n\n

<!--EDIT|Froschpopo|1112488416-->
Froschpopo
 2005-04-03 17:01
#43145 #43145
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
hat keiner ne Idee?
ptk
 2005-04-04 15:42
#43146 #43146
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
Rufst du es auch nach jeder Aenderung auf?
Froschpopo
 2005-04-04 20:07
#43147 #43147
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
da gibts keine Änderung
ich hab nen Textlabel in einem Frame. Der Text hat keinen automatischen zeilenumbruch. Wenn der Text länger wird als das Frame breit ist, dann schneidet er den Überstand einfach ab anstatt eine neue Zeile zu beginnen.
Crian
 2005-04-04 20:09
#43148 #43148
User since
2003-08-04
5866 Artikel
ModeratorIn
[Homepage]
user image
Dann musst Du mal mit den Einstellungen für wrap herumprobieren.
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;

use strict; use warnings; Link zu meiner Perlseite
Froschpopo
 2005-04-04 20:13
#43149 #43149
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
was fürn wrap ? Das gibts nicht für ne Pane
Crian
 2005-04-04 20:16
#43150 #43150
User since
2003-08-04
5866 Artikel
ModeratorIn
[Homepage]
user image
ups ... und warum nimmst Du ein pane? Bzw. warum setzt Du in das (?) Pane nicht ein Textwidget statt eines Labels? Du kannst ja relief auf flat stellen...\n\n

<!--EDIT|Crian|1112631480-->
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;

use strict; use warnings; Link zu meiner Perlseite
Froschpopo
 2005-04-04 20:26
#43151 #43151
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
mach ich doch:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
    my $pane = $config{MainWindow}->Scrolled(
"Pane", -scrollbars => 'e',
-width=>$config{MainWidth},
-height=>300
)->pack(-side=>'top');
$pane->Label(
-text => "test",
-width=> $config{MainWidth}-160,
-justify => 'left',
-anchor => 'w',
)->grid(-row=>$counter, -column=> 1, -sticky => 'w');

Er schreibt die neuen Einträge auch immer unten dran, allerdings bewegt sich der Scrollbalken nicht mit.
<< |< 1 2 >| >> 11 Einträge, 2 Seiten



View all threads created 2005-04-03 01:38.