I wonder if it is possible to have different sorts of objects in the columns.

I know that i can have checkboxes in the first column by supplying '-checkboxes => 1' with the listbox creator.
But i have no clue how to do it for other columns. Nor wether it is possible to have them on a per item basis.

I'ts a pity that Win32::GUI is so badly documented.

here a code snippet i used for trying out stuff.
#!/usr/bin/perl use Win32::GUI; # Creating Main Window my $main = Win32::GUI::Window->new(-name => "Main",-width => 310 , -he +ight => 430,-style => WS_OVERLAPPEDWINDOW | 1); # Creating Listview my $listview = $main->AddListView( -title => "Listview", -name => "Listview" , -width => 280 , -height => 380, -top => 10 , -left => 10, -fullrowselect => 0, -gridlines => 1, -hottrack => 0, -style => WS_VISIBLE | 1, ); # Inserting Columns $listview->InsertColumn(-index => 0, -text => "Sessionname"); $listview->ColumnWidth(0,80); $listview->InsertColumn(-index => 1, -text => "Checkboxes"); $listview->ColumnWidth(1,50); $listview->InsertColumn(-index => 2 , -text => "BlaBla" ); $listview->ColumnWidth(2,50); $listview->InsertItem(-item => 0 , -text => "InsertItem"); my $lvitem = $listview->Item(0); my $lvsubitem1 = new Win32::GUI::ListView::SubItem($lvitem,1); my $lvsubitem2 = new Win32::GUI::ListView::SubItem($lvitem,2); my $lvckbox = new Win32::GUI::Checkbox($lvsubitem2, -checked => 1, -na +me => "CkBx" , -text => "Chekbx"); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { $main->AddNotifyIcon( -name => "Tray", -tip => '', -icon => '', -id => 222, ); -1; } sub Main_Minimize { $main->Disable(); $main->Hide(); 1; } sub CkBx_Click { print "Radio Clicked\n"; }
cheers thanks for all help

In reply to Listview with checkboxes is it possible ? by sechser

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.