in reply to activate and selectionSet methods, negative columns in TableMatrix

Its called focus

But what do the negative value for column index refer to ?

What do the docs say? What does the source say? The C-source?

so ... Tk::TableMatrix,

I think -2 referes to the second to last column, and -1 to the last column ... you can use colWidth for introspection, so you can use it to dump the column widths before and after

I'm cute , right ? :)

  • Comment on Re: activate and selectionSet methods, negative columns in TableMatrix (focus)
  • Download Code

Replies are listed 'Best First'.
Re^2: activate and selectionSet methods, negative columns in TableMatrix (focus)
by Anonymous Monk on Jan 22, 2015 at 09:54 UTC
    Hi There,

        Thank you for the swift response.
    1. Yes. $tm->focus; does it make it work and thank you for that. Now I realize that $tm->activate("topleft"); doesn't implicitly call $tm->focus;. That said,
      $tm->focus; $tm->activate("topleft");
      has the same effect as,
      $tm->activate("topleft"); $tm->focus;
      I'm not sure why this is so.

    2. Any answers to second question?

    3. I'm a entry level learner. So I don't understand the Perl source code well. That aside, while answer the sounds reasonable that -ve column numbers refer to those from counted from the right(starting rightmost column at -1 as there is no -0), I tried
      $tm->colWidth (0, 25); print $tm->colWidth(), "\n";

      0 25

      $tm->colWidth (-10, 32); $,="|"; print $tm->colWidth(), "\n";

      0 25|-10 32|
    4. Now -10 refers to first column. The following callback for -browsecommand option,
      sub validate_browse { $tm->colWidth (-10, 32); $tm->configure(-padx =>($tm->cget(-padx))); #display refresh trick, }
      doesn't change the width of first column. Why is this so?

      Many thanks in advance.

      Any answers to second question?

      Yes, figure it out :)Tk::WidgetDump can help you get more diagnotical with most widgets

      I'm a entry level learner...Why is this so?

      :) Second verse same as the fist :) you're going to have to write a little code to figure it out, and maybe read a bit of code -- a good 15-60 minutes of work ... maybe

      Oooh, another hint, the "original" tablematrix documentation might answer stuff (might not too)

      I'm just not in the mood for a tk info hunt ATM , sorry :)

                Thank you for providing me the information pointers in the limited time you have. I'll try to dig around and find out. Hopefully, I'll not get lost.

                That aside, in the first reply you asked

        ....I'm cute , right ? :)

        Well, AM is talking to AM (like smiling by standing in front of mirror). So one is always cute to ones own self. Needless to say then that you're cute. Because, I'm cute.

        Thanks again. Have a good day