Forum: Poser Python Scripting


Subject: Useful Code Snippets

structure opened this issue on Jun 27, 2019 ยท 94 posts


structure posted Wed, 27 April 2022 at 4:57 AM Forum Coordinator

Added to dialog Library:


    def getnumberentry(self, alertmessage, prompt, caption, value, min, max, wx.DefaultPosition):
        NE_dialog = wx.NumberEntryDialog(None, alertmessage, prompt, caption, value, min, max, pos)
        return NE_dialog.GetValue() if NE_dialog.ShowModal() == wx.ID_OK else None
   
example Usage:
   
duplicate = (getnumberentry("How Many %s's ?" % item, "Select a number",
                            "Number Entry Dialog", 0, 0, 100))

Locked Out