G'day penmkr,

Putting vague, incorrect references in your questions does you no favours at all. Some monks, who could provide (possibly expert) advice, may decide to match your effort and provide no help; others may attempt to search for book titles (and find they don't exist), or use a text-based URL in their browsers (and find it's invalid), then give up. The amount of effort you put into your question will directly reflect the quality of answers you receive: help us to help you. If you don't know how to create links here, see "What shortcuts can I use for linking to other information?".

The book you refer to ("learn ring perl/tk") does not exist; I expect you mean Learning Perl/Tk. You say you have that book: it shows the correct title on the front cover, the spine, and the back cover; when you open the cover it's there again, and again when you turn the page, and again on the next page. There's absolutely no reason to get that wrong! It's also obvious that the publisher is O'Reilly (that appears in multiple places as well, along with their web address). Putting '"Learning Perl/Tk" site:oreilly.com' into my search engine gives, as the first result, "Learning Perl/Tk".

Tk and Tkx are quite different modules. They both have a relationship to Tcl/Tk but it's very different. A book, or other reference, on Tk will not provide code you can use with Tkx; it may provide some ideas on underlying concepts.

The thing that looks like a vague attempt at a URL ("tkdocs\tutorial\morewidgets.html") is completely bogus; I expect you mean http://www.tkdocs.com/tutorial/morewidgets.html. If you're looking at that page, just copy and paste the URL into your question here; I can't imagine a scenario where that's not easier than physically typing it yourself (and it's quite clearly less error-prone).

"The tutorial states that tcl method '_tk__listbox' is the way to create a listbox using tkx."

That is completely false. It does not say that at all. That page starts with a brief description of what a listbox is, followed by this (original emphasis unaltered):

Listboxes are created using the new_tk__listbox method, a.k.a. Tkx::tk__listbox:

$parent->new_tk__listbox(-height => 10)

Code to instantiate a Listbox object appears once more in that section (in the full tutorial example):

... $lbox = $content->new_tk__listbox(-listvariable => \$cnames, -height = +> 5); ...
" I have read everything I can find on the subject with no success."

That doesn't tell us what you have read. I recommend the following.

— Ken


In reply to Re: creating a listbox in tkx by kcott
in thread creating a listbox in tkx by penmkr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.