Getting Scroll Bar back to top and resetting focus to top Entry box 
Author Message
 Getting Scroll Bar back to top and resetting focus to top Entry box

In my program, that many people have so kindly helped with, that I am not
sure I can call it
mine, anymore (8*P), I need to do two things.

After I have written out the information to a file, and cleared the fields,
I need to put the focus
on the original Entry box, and set the scroll bar back to the top.

the -takefocus, and ->focusNext (etc) all appear to only put focus on one
window, versus another.

This is a single windowed program.

It is set up accordingly:

Label: Entry1

Label: Radiobutton1  Radiobutton2
Label: Text

For loop to dynamically add:                         [ ]\  Scroll Bar
Label: EntryX                                               [ ]/

Write Button                    Quit Button

Once Write is clicked, it writes the data to a file, and then clears all
fields.
I need to have the scroll bar go back to the top, if needed, and then
set the focus back to the Entry1

I can show any/all code if you want/need, but it is currently 432 lines
(With
comments).

I cannot get the Mastering Perl/TK book, as neither book store I frequent
has it
in yet, and they don't know when.  Waldenbooks, here, said that they do not
even show
it is available to them, yet (Defined as their ordering house has not
ordered any).
Barnes and Nobles is not sure when they will get it in, but "it is on its
way"...

Please point me in a direction that can help me out here.

TIA!!!



Wed, 28 Jul 2004 00:32:15 GMT  
 Getting Scroll Bar back to top and resetting focus to top Entry box


Quote:

> I cannot get the Mastering Perl/TK book, as neither book store I
> frequent has it > in yet, and they don't know when.  Waldenbooks,
> here, said that they do not even show it is available to them,
> yet (Defined as their ordering house has not ordered any).
> Barnes and Nobles is not sure when they will get it in, but
> "it is on its way"...

> Please point me in a direction that can help me out here.

        http://www.amazon.com/exec/obidos/ASIN/1565927168

--
  Marc Dashevsky -- Remove '_' from address if replying by e-mail.



Wed, 28 Jul 2004 01:02:14 GMT  
 Getting Scroll Bar back to top and resetting focus to top Entry box

Quote:
> I need to have the scroll bar go back to the top, if needed, and then
> set the focus back to the Entry1

You never said what you were 'Scroll'ing. I am assuming a Tk::Pane
which holds your dynamic entries.

$pane->see($topEntryWidget);

or

$pane->xview(moveto=>0);
$pane->yview(moveto=>0);

As for the entry:

$entry->focus;

Jack



Wed, 28 Jul 2004 08:13:14 GMT  
 Getting Scroll Bar back to top and resetting focus to top Entry box

Quote:
>$pane->xview(moveto=>0);
>$pane->yview(moveto=>0);

IMO, this is probably his best bet. He creates the labels/entries in a loop,
and doesn't really keep track of any of the
widgets -- just their values.

Rob



Wed, 28 Jul 2004 14:15:50 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. top bar icon image.

2. Deleting top lines in Scrolled textbox.

3. guestbook: new entry at top && fast

4. guestbook: new entry at top && fast

5. Help on getting a Perl/Tk window to stay on top

6. Problems getting values back for Entry widgets

7. Scrolled Listbox with a top label that scrolls horizontally ?

8. Scrolled Listbox with a top label that scrolls horizontally ?

9. Printing a list from the bottome to the top verses top to bottom.

10. Scrolled widget and switching the input focus

11. Writing Format top on demand

12. Printing top of form

 

 
Powered by phpBB® Forum Software