htmlhelpcontroller on top?

Looking at the online docs, you can include wx.html.HF_DIALOG and wx.html.HF_MODAL in the style. I haven’t checked it, but I think that should work.

···

----- Original Message ----
From: Mike Driscoll mdriscoll@co.marshall.ia.us
To: wxpython-users@lists.wxwidgets.org
Sent: Monday, May 5, 2008 3:15:55 PM
Subject: Re: [wxpython-users] htmlhelpcontroller on top?

Phillip Watts wrote:

They also have help.

Is there a way to force the htmlhelpcontroller dialog to be
on top? the object doesn’t have Raise().
Thanks

I think what you want is to call the dialog’s ShowModal() method rather
than Show().

I’m not sure its based on Dialog. Anyway, I don’t know how to
use ShowModal.

import wx
import wx.html

class doc:
def init(s,page=‘’):
s.help = wx.html.HtmlHelpController()
s.help.AddBook(‘doc/pipos.hpp’)
if page: s.display(page)

def display(s,page):
s.help.Display(page)
s.help.ShowModal()

File “/home/phil/pos/piposdoc.py”, line 13, in display
s.help.ShowModal()
AttributeError: ‘HtmlHelpController’ object has no attribute ‘ShowModal’

Hmmm…in doing some research, I stumbled across this thread:

http://lists.wxwidgets.org/pipermail/wxpython-mac/2007-May/002281.html

In it, Robin seems to say that it is neither a frame nor a dialog, but a
controller or wrapper around a frame. Thus, I am not sure what to tell
you. Hopefully Robin will weigh in soon with his nigh infinite wisdom
regarding wx.

Mike


wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

File "/home/phil/pos/piposdoc.py", line 8, in __init__
    s.help = wx.html.HtmlHelpController(style=wx.html.HF_DIALOG|
wx.html.HF_MODAL )
AttributeError: 'module' object has no attribute 'HF_DIALOG'

File "/home/phil/pos/piposdoc.py", line 7, in __init__
    s.help = wx.html.HtmlHelpController(style=wx.html.HF_MODAL )
AttributeError: 'module' object has no attribute 'HF_MODAL'

···

On Monday 05 May 2008 16:42:56 Ben Kaplan wrote:

Looking at the online docs, you can include wx.html.HF_DIALOG and
wx.html.HF_MODAL in the style. I haven't checked it, but I think that
should work.

Which version of wxPython are you using? If it's not the latest the
please try upgrading.

Ok, I changed wx.pth to 2.8 and now the following works

import wx
import wx.html

class doc:
    def __init__(s,page=''):
        #.help = wx.html.HtmlHelpController()
        s.help = wx.html.HtmlHelpController(style=wx.html.HF_D
EFAULT_STYLE|wx.html.HF_DIALOG|wx.html.HF_MODAL)
        s.help.AddBook('doc/pipos.hpp')
        if page: s.display(page)

    def display(s,page):
        s.help.Display(page)

And If I do this:

    def dohelp(s,event):
        s.help.display('payment.html')
        s.f.Raise()

Then the payment window does not get minimized.
HOWEVER, when all windows are closed, I either get a seg
fault or the app hangs until CTRL-C.

It is certainly getting closer. :slight_smile: