How to Show Help From a Modal Dialog?

I guess this is a Windows standard, that modal dialogs are not
supposed to show help screens. Is that right? Surely it's an
arbitrary idea, one of those things that's a great idea from the
programmer's point of view, but a dumb idea from the user's point
of view.

I've got a complicated modal dialog that ought to be able to show
help. So, what are the loopholes? All I can think of is to have
the modal dialog pop up its help in another modal dialog. If that
dialog looked a lot like a help dialog that was already open,
maybe nobody would even realize, except that they've got to close
the help window to continue.

Any other good ideas?

How about making my help viewer an out-of-process COM server?
Is python good for out-of-process servers?

TIA again.

Al

Hi everbody,

first of all *many* thanks to the wxPyhton (and wxWindows) builders.
I just started working with python / wxPython for a week but it is
very easy to learn and to use. Programming is fun again :slight_smile:

Now to the question;
I have a scrolled window where I draw on a device context

If I use the scrollbars to move the 'wxScrolledWindow' the screen is
not refreshed correctly

(see

http://www.nedlinux.nl/~delphiro/images/before.png

and

http://www.nedlinux.nl/~delphiro/images/after.png

both 7kB)

Is this a known problem or does anyone have a workaround?
(will this be solved in future releases ?)

[my code]
EVT_PAINT(self.pb, self.OnPBPaint) #where pb = the wxScrolledWindow)

...

def OnPBPaint(self, event):
  dc = wxPaintDC(self.pb)
  self.pb.PrepareDC(dc)
  dc.BeginDrawing()
  self.ShowPBGrid( dc )
  self.ShowPBPoints( dc )
  dc.EndDrawing()

...

def ShowPBGrid( self, dc ):
    dc.SetPen(wxPen(wxBLACK, 1, wxSOLID))
    xs = self.pb.GetViewStart()[0] * self.dgrid
    ys = self.pb.GetViewStart()[1] * self.dgrid
    for x in range( xs, xs + self.nb.GetSizeTuple()[0], self.dgrid ):
      for y in range( ys, ys + self.nb.GetSizeTuple()[1], self.dgrid ):
        dc.DrawPoint( x, y )

...

def ShowPBPoints( self, dc ):
    dc.SetPen(wxPen(wxRED, 1, wxSOLID))
    left = self.pb.GetViewStart()[0] * self.pb.GetScrollPixelsPerUnit()[0]
    top = self.pb.GetViewStart()[1] * self.pb.GetScrollPixelsPerUnit()[1]
    right = left + self.pb.GetClientSize()[0]
    bottom = top + self.pb.GetClientSize()[1]
    for id, p in self.geo.points:
      px, py = self.GeometryToPB( p[0], p[1] )
      if px > left and px < right and py > top and py < bottom:
        dc.DrawCircle( px, py, 2 )
        dc.DrawText( "%d" % id, px - 5, py + 5 )
[/my code]

Thanks in advance,
Rob

achrist@easystreet.com wrote:

I guess this is a Windows standard, that modal dialogs are not
supposed to show help screens. Is that right? Surely it's an
arbitrary idea, one of those things that's a great idea from the
programmer's point of view, but a dumb idea from the user's point
of view.

I've got a complicated modal dialog that ought to be able to show
help. So, what are the loopholes? All I can think of is to have
the modal dialog pop up its help in another modal dialog. If that
dialog looked a lot like a help dialog that was already open, maybe nobody would even realize, except that they've got to close
the help window to continue.

That is fairly standard...

Any other good ideas?

How about making my help viewer an out-of-process COM server?
Is python good for out-of-process servers?

Yes, or you could use some other IPC that Python can easily do, like xmlrpc, etc.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Rob van Putten wrote:

Hi everbody,

first of all *many* thanks to the wxPyhton (and wxWindows) builders.
I just started working with python / wxPython for a week but it is
very easy to learn and to use. Programming is fun again :slight_smile:

Cool!

Now to the question;
I have a scrolled window where I draw on a device context

If I use the scrollbars to move the 'wxScrolledWindow' the screen is
not refreshed correctly

Is this a known problem or does anyone have a workaround?
(will this be solved in future releases ?)

Nothing is jumping out at me from your code snippets as being wrong. Try to compare with what is done in some of the samples in the demo that are drawing to a scrolled window, or distill your code down to a small sample that shows the problem and send it to the list for others to review.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!