parameters: (widget, master, relx=0.5, rely=0.3, expose=1)
return_statement: return widget
docstring: Make an existing toplevel widget transient for a master.
  
      The widget must exist but should not yet have been placed; in
      other words, this should be called after creating all the
      subwidget but before letting the user interact.
docstring_summary: Make an existing toplevel widget transient for a master.
docstring_tokens: Make an existing toplevel widget transient for a master .
function: def set_transient(widget, master, relx=0.5, rely=0.3, expose=1):
      """Make an existing toplevel widget transient for a master.
  
      The widget must exist but should not yet have been placed; in
      other words, this should be called after creating all the
      subwidget but before letting the user interact.
      """
  
      widget.withdraw() # Remain invisible while we figure out the geometry
      widget.transient(master)
      widget.update_idletasks() # Actualize geometry information
      if master.winfo_ismapped():
          m_width = master.winfo_width()
          m_height = master.winfo_height()
          m_x = master.winfo_rootx()
          m_y = master.winfo_rooty()
      else:
          m_width = master.winfo_screenwidth()
          m_height = master.winfo_screenheight()
          m_x = m_y = 0
      w_width = widget.winfo_reqwidth()
      w_height = widget.winfo_reqheight()
      x = m_x + (m_width - w_width) * relx
      y = m_y + (m_height - w_height) * rely
      widget.geometry("+%d+%d" % (x, y))
      if expose:
          widget.deiconify()      # Become visible at the desired location
      return widget
function_tokens: def set_transient ( widget , master , relx = 0.5 , rely = 0.3 , expose = 1 ) : widget . withdraw ( ) # Remain invisible while we figure out the geometry widget . transient ( master ) widget . update_idletasks ( ) # Actualize geometry information if master . winfo_ismapped ( ) : m_width = master . winfo_width ( ) m_height = master . winfo_height ( ) m_x = master . winfo_rootx ( ) m_y = master . winfo_rooty ( ) else : m_width = master . winfo_screenwidth ( ) m_height = master . winfo_screenheight ( ) m_x = m_y = 0 w_width = widget . winfo_reqwidth ( ) w_height = widget . winfo_reqheight ( ) x = m_x + ( m_width - w_width ) * relx y = m_y + ( m_height - w_height ) * rely widget . geometry ( "+%d+%d" % ( x , y ) ) if expose : widget . deiconify ( ) # Become visible at the desired location return widget