Python

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • wx.Dialog and Hide()

    8 answers - 648 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    when using Hide() for wx.Dialog (Modal) it returns and being destroyed.
    Is there anything similar to wx.Dialog that blocks input on other windows
    but still can be hidden and restored normally without returning ? (something
    between Modal and Modeless dialogs)
    Is there any way to change wx.Dialog itself to work like this?
    [I'm trying to hide the entire application as I said before, and to be able
    to restore it exactly as it was before hiding it. by hiding all top-level
    windows the application does hides itself completely, but since Dialogs get
    destroyed on Hide() it is not possible to restore them.]
  • No.1 | | 756 bytes | |

    roee88 shlomo wrote:
    when using Hide() for wx.Dialog (Modal) it returns and being destroyed.
    Is there anything similar to wx.Dialog that blocks input on other
    windows but still can be hidden and restored normally without returning
    ? (something between Modal and Modeless dialogs)
    Is there any way to change wx.Dialog itself to work like this?

    [I'm trying to hide the entire application as I said before, and to be
    able to restore it exactly as it was before hiding it. by hiding all
    top-level windows the application does hides itself completely, but
    since Dialogs get destroyed on Hide() it is not possible to restore them.]

    Dialogs shouldn't be destroyed when hidden. Which platform and version
    is this?
  • No.2 | | 1370 bytes | |

    win32, latest wxPython.

    Here are some notes from wxwidgets (
    #wxdialogshow):

    *wxDialog*::Show

    *bool* *Show*(*const bool** show*)

    Hides or shows the dialog.

    *Parameters*

    *show*

    If TRUE, the dialog box is shown and brought to the front; otherwise
    the box is hidden. *If FALSE and the dialog is modal, control is
    returned to the calling program.*

    *Remarks*

    The preferred way of dismissing a modal dialog is to use *wxDialog*
    ::EndModal<#wxdialogendmodal>

    6/30/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:

    roee88 shlomo wrote:
    when using Hide() for wx.Dialog (Modal) it returns and being destroyed.
    Is there anything similar to wx.Dialog that blocks input on other
    windows but still can be hidden and restored normally without returning
    ? (something between Modal and Modeless dialogs)
    Is there any way to change wx.Dialog itself to work like this?

    [I'm trying to hide the entire application as I said before, and to be
    able to restore it exactly as it was before hiding it. by hiding all
    top-level windows the application does hides itself completely, but
    since Dialogs get destroyed on Hide() it is not possible to restore
    them.]

    Dialogs shouldn't be destroyed when hidden. Which platform and version
    is this?
  • No.3 | | 417 bytes | |

    roee88 shlomo wrote:
    win32, latest wxPython.

    If TRUE, the dialog box is shown and brought to the front;
    otherwise the box is hidden. *_If FALSE and the dialog is
    modal, control is returned to the calling program

    There is a big difference between "control returning to the program",
    and the dialog being destroyed. All it does in addition to hiding the
    window is cause ShowModal to return.
  • No.4 | | 1177 bytes | |

    Sure, but then again right after ShowModal() there must be Destroy() [at as
    much as I have cheked].

    I was able to by-pass this and 95% of all items can be hidden perfectly (the
    other 5% are wx.MessageDialog and wx.FileDialog which unlike
    wx.Dialogaren't top-level and unlike children they aren't being hidden
    when the
    parent does).

    *Thank you Robin!*

    btw,
    I have noticed RegisterHotKey\UnregisterHotKey does not appear in the
    wxPython documentation (though it did in the past as it's available through
    google cached).
    Why?
    The reaon I'm asking is that UnregisterHotKey doesn't work. Coincidence?
    :-)

    7/1/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:

    roee88 shlomo wrote:
    win32, latest wxPython.
    --
    If TRUE, the dialog box is shown and brought to the front;
    otherwise the box is hidden. *_If FALSE and the dialog is
    modal, control is returned to the calling program

    There is a big difference between "control returning to the program",
    and the dialog being destroyed. All it does in addition to hiding the
    window is cause ShowModal to return.
    --
  • No.5 | | 1088 bytes | |

    roee88 shlomo wrote:
    Sure, but then again right after ShowModal() there must be Destroy() [at
    as much as I have cheked].

    Since you are the one calling Destroy then if you want to support hiding
    without destroying then you need to detect the situation when ShowModal
    returns and handle it appropriately.

    I was able to by-pass this and 95% of all items can be hidden perfectly
    (the other 5% are wx.MessageDialog and wx.FileDialog which unlike
    wx.Dialog aren't top-level and unlike children they aren't being hidden
    when the parent does).

    Because they are not wxWindows, but just a wrapper around a native
    platform API that shows the native dialog.

    *Thank you Robin!*

    btw,
    I have noticed RegisterHotKey\UnregisterHotKey does not appear in the
    wxPython documentation (though it did in the past as it's available
    through google cached).

    Which set of docs?

    Why?
    The reaon I'm asking is that UnregisterHotKey doesn't work.
    Coincidence? :-)

    It's probably not intentional.
  • No.6 | | 1347 bytes | |

    :

    Google Cached:

    HotKey still respond after calling UnregisterHotKey(id)
    [is = same id used in RegisterHotKey]

    7/3/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:

    roee88 shlomo wrote:
    Sure, but then again right after ShowModal() there must be Destroy() [at
    as much as I have cheked].
    --
    Since you are the one calling Destroy then if you want to support hiding
    without destroying then you need to detect the situation when ShowModal
    returns and handle it appropriately.

    I was able to by-pass this and 95% of all items can be hidden perfectly
    (the other 5% are wx.MessageDialog and wx.FileDialog which unlike
    wx.Dialog aren't top-level and unlike children they aren't being hidden
    when the parent does).

    Because they are not wxWindows, but just a wrapper around a native
    platform API that shows the native dialog.
    >
    >
    >
    >

    *Thank you Robin!*

    btw,
    I have noticed RegisterHotKey\UnregisterHotKey does not appear in the
    wxPython documentation (though it did in the past as it's available
    through google cached).

    Which set of docs?

    Why?
    The reaon I'm asking is that UnregisterHotKey doesn't work.
    Coincidence? :-)
    --
    It's probably not intentional.
  • No.7 | | 201 bytes | |

    roee88 shlomo wrote:
    HotKey still respond after calling UnregisterHotKey(id)
    [is = same id used in RegisterHotKey]
    Please enter a bug report about this, with a category of "wxMSW Specific"
  • No.8 | | 293 bytes | |

    I did.
    Thanks.
    7/5/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:
    roee88 shlomo wrote:
    HotKey still respond after calling UnregisterHotKey(id)
    [is = same id used in RegisterHotKey]
    Please enter a bug report about this, with a category of "wxMSW Specific"

Re: wx.Dialog and Hide()


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Python"

EMSDN.COM