[wxpython-mac] "Unsaved" dot in frame close button

Robin Dunn robin at alldunn.com
Thu May 29 10:18:45 PDT 2008


Stefan Csomor wrote:
> Hi
> 
> sorry, I didn’t expose that feature yet from wxMac, is there a way to 
> call Carbon directly ? the method you have to call is
> 
> OSStatus SetWindowModified (
>    WindowRef window,
>    Boolean modified
> );
> 

I've added a wrapper for MacGetTopLevelWindowRef so starting with the 
next preview build you'll be able to do it like this:

  >>> import ctypes
  >>> carbon = ctypes.CDLL('/System/Library/Carbon.framework/Carbon')
  >>> carbon.SetWindowModified(frame.MacGetTopLevelWindowRef(), True)


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



More information about the wxpython-mac mailing list