Arthur Schwarz wrote:
I'm trying to use 1.03_4 Grid and have the following questions:
1. In GUI.html::SetCellFormat there is a listing of 'DT_*' formats. In GUI::Constants but missing from this list are:
  DT_CHARSTREAM
  DT_DISPFILE
  DTIDEPREFIX
  DT_METAFILE
  DT_NOFULLWIDTHCHARBREAK
  DT_PLOTTER
  DT_PREFIXONLY
  DT_RASCAMERA
  DT_RASDISPLAY
  DT_RASPRINTER
Oversight or deliberate?

Not intentionally omitted from the docs - I simply ported the previous version to work with newer Win32::GUI releases. I've made a note to add them.

2. I'm experimenting with using List Boxes, Combo Boxes and Buttons in a Grit but have somehow missed the point. My implementation is a no-go, code below. What am I missing?

I'm afraid that it's a part of the codebase that I've never used, so I can't help - anyone else?

Regards,
Rob.

use Win32::GUI; # Binding to Win32 GUI
use Win32::GUI::Grid;           # Binding to Win32 GUI Grid
use Win32::GUI::Constants;      # Windows constants
use integer;
my $TopWindow = new Win32::GUI::Window( # Create Main Window
        -name         => 'TopWindow',
        -helpbox      => 1,
        -left         => 30,
        -hashelp      => 1,
        -height       => 450,
        -maxwidth     => 565,
        -minheight    => 380,
        -minwidth     => 565,
        -title        => 'GUI Editor',
        -top          => 20,
        -width        => 570,
   );
my $Grid = $TopWindow->AddGrid( # Create Grid object
        -columns           =>  2,
        -doublebuffer      =>  1,
        -editable          =>  0,
#       -enable            =>  Enable
        -fixedcolumns      =>  1,
        -fixedrows         =>  1,
#       -height            =>  Heigth
        -hscroll           =>  0,
#       -left              =>  Left position
        -name              =>  "Property Grid",
#       -parent            =>  $Editor::Win::TopWindow,
#       -popstyle          =>  Pop style
        -pos               =>  [ 425, 0 ],
#       -pushstyle         =>  Push style
        -rows              =>  10,
        -size              =>  [ 140, $TopWindow->Height()-43 ],
#       -style             =>  Default style
#       -top               =>  Top  position
        -visible           =>  1,
        -vscroll           =>  0,
#       -width             =>  Width
  );
$Grid->SetCellText(0, 0, "Property" );
  $Grid->SetCellText(0, 1, "Value" );
for my $row (1..$Grid->GetRows()) {
    $Grid->SetCellText($row, 0, "Property $row " );
  }
for my $row (1..4) {
    for my $col (1..$Grid->GetColumns()) {
      $Grid->SetCellText($row, $col, "Cell : <$row, $col>");
    }
  }
my $row = 1;

for my $CellType (GVIT_NUMERIC, GVIT_DATE, GVIT_DATECAL, GVIT_TIME, GVIT_CHECK, GVIT_COMBO, GVIT_LIST, GVIT_URL) {
     $Grid->SetCellType($row++, 2, $CellType);
  }
  $Grid->SetCellOptions( 5, 2, 1 );  # button?
  $Grid->SetCellOptions( 6, 2, [ "Combo", "Box" ]);
  $Grid->SetCellOptions( 7, 2, [ "List", "Box" ]);
  $Grid->AutoSize();
  $TopWindow->Show();                             # makes TopWindow visible
  Win32::GUI::Dialog();                           # Windows control loop
art
(& thanks)


------------------------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


------------------------------------------------------------------------

_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Reply via email to