[Prev][Next][Index][Thread]

Need help with <tab-control-page>



I'm creating an application with HD/FD and am having problems with my
<tab-control-page>.

The main display is a <tab-control-page>, and I would like the first tab to
be the tab selected when the applications starts up. What's happening is
that the application starts up with the first tab in front (the default
behavior), but It's not displaying anything. If I select any other tab, that
tab displays its contents, and then I can select the first tab, and it will
display its contents.

Any clues as to what additional initializing that I need to do ?


Thanks,

Ron Franke-Polz

Here's a snippet of the code that creates the display ...

----------------------------------------------------------------------------
-------
Module:    dfm
Synopsis:  A Design-For-Manufacturability tool
Author:    Ron Franke-Polz
Copyright: (C) 2000, Ron Franke-Polz.  All rights reserved.

[snip]


// ********************************************************
// <dfm-main-frame>
// ********************************************************
define frame <dfm-main-frame> (<simple-frame>)

  pane part-tree (frame)
     make(<tree-control>, label: "part",
                          label-key: name,
                          roots: list(*parts*),
                          children-predicate: children?,
                          children-generator:
                            method (x)
                              x.children;
                            end,
                          popup-menu-callback:
                            method (gadget :: <tree-control>, node, #rest
args)
                              if (right-mouse-action?(node))
                                right-mouse-action(node);
                                update-gadget(gadget);
                              end if;
                            end);

  pane output-editor (frame)
     make(<text-editor>, columns: 80,
                         lines: 25,
                         fixed-height?: #f,
                         fixed-width?: #f,
                         auto-scroll?: #t);

  pane part-details-table (frame)
      make(<table-control>);

  pane define-part-pane (frame)
      make(<tab-control-page>, label: "Define Part",
                               child: horizontally (spacing: 4)
                                        frame.part-tree;
                                        //frame.part-details-table;
                                      end);

  pane define-system-pane (frame)
     make(<tab-control-page>, label: "Define System",
                              child: vertically (spacing: 4)
                                       frame.output-editor;
                                      end);
  pane main-pane (frame)
    make(<tab-control>,
         pages: vector(frame.define-part-pane, frame.define-system-pane),
         current-page: frame.define-part-pane);

  layout (frame)
    vertically (spacing: 4)
      frame.main-pane;
    end;

  command-table (frame)
    *dfm-main-command-table*;

  //*** MAYBE INCLUDE A TOOL BAR ***
  /* tool-bar (frame)
       make-command-tool-bar(frame-manager(frame), frame); */

  status-bar (frame)
    make(<status-bar>);

  keyword title: = $application-name;

end frame <dfm-main-frame>;

// initialize
//
define method initialize (frame :: <dfm-main-frame>, #key) => ()
  next-method();
  frame.frame-document := make(<dfm-main-document>, modified?: #t);
  update-gadget(frame.main-pane);
end method;







Follow-Ups: