Python wx.STAY_ON_TOP Examples
The following are 30
code examples of wx.STAY_ON_TOP().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: dialog.py From wxGlade with MIT License | 7 votes |
def create_widget(self): if self.parent: parent = self.parent.widget else: parent = common.main # we set always a default style because this is the best one for editing the dialog # (for example, a dialog without a caption would be hard to move, etc.) default_style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER if common.pin_design_window: default_style |= wx.STAY_ON_TOP # change 2002-10-09: now we create a wxFrame instead of a wxDialog, # because the latter gives troubles I wasn't able to solve when using wxPython 2.3.3.1 :-/ self.widget = wx.Frame(parent, self.id, "", style=default_style) self.widget.SetBackgroundColour(compat.wx_SystemSettings_GetColour(wx.SYS_COLOUR_BTNFACE)) self._set_widget_icon()
Example #2
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__(self, size=(-1, -1), pic_path=None, display=0): wx.Frame.__init__( self, None, -1, "ShowPictureFrame", style=wx.NO_BORDER | wx.FRAME_NO_TASKBAR #| wx.STAY_ON_TOP ) self.SetBackgroundColour(wx.Colour(0, 0, 0)) self.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick) self.Bind(wx.EVT_CLOSE, self.OnClose) bitmap = wx.EmptyBitmap(1, 1) self.staticBitmap = wx.StaticBitmap(self, -1, bitmap) self.staticBitmap.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick) self.staticBitmap.Bind(wx.EVT_MOTION, self.ShowCursor) self.timer = Timer(2.0, self.HideCursor)
Example #3
Source File: Keymap.py From meerk40t with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Keymap.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((500, 530)) self.list_keymap = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES) self.button_add = wx.Button(self, wx.ID_ANY, _("Add Hotkey")) self.text_key_name = wx.TextCtrl(self, wx.ID_ANY, "") self.text_command_name = wx.TextCtrl(self, wx.ID_ANY, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.on_button_add_hotkey, self.button_add) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self) self.text_key_name.Bind(wx.EVT_KEY_DOWN, self.on_key_press) self.SetFocus()
Example #4
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def ShowHidMessage(self, disableHid): """ Informs the user, that the system needs to restart the system to let the HID registry changes take effect. """ try: self.SetHidState(disableHid) except WindowsError: dialog = wx.MessageDialog( None, self.text.hidErrorMessage, self.text.hidDialogCaption, wx.OK|wx.ICON_ERROR|wx.STAY_ON_TOP ) else: dialog = wx.MessageDialog( None, self.text.hidDialogMessage, self.text.hidDialogCaption, wx.OK|wx.ICON_INFORMATION|wx.STAY_ON_TOP ) dialog.ShowModal() dialog.Destroy()
Example #5
Source File: ShowOSD.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent): wx.Frame.__init__( self, parent, -1, "OSD Window", size=(0, 0), style=( wx.FRAME_SHAPED | wx.NO_BORDER | wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP ) ) self.hwnd = self.GetHandle() self.bitmap = wx.EmptyBitmap(0, 0) # we need a timer to possibly cancel it self.timer = threading.Timer(0.0, eg.DummyFunc) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_CLOSE, self.OnClose)
Example #6
Source File: JobSpooler.py From meerk40t with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: JobSpooler.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((661, 402)) self.list_job_spool = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.list_job_spool) self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_item_rightclick, self.list_job_spool) # end wxGlade self.dirty = False self.update_buffer_size = False self.update_spooler_state = False self.update_spooler = False self.elements_progress = 0 self.elements_progress_total = 0 self.command_index = 0 self.listener_list = None self.list_lookup = {} self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #7
Source File: main.py From wxGlade with MIT License | 6 votes |
def pin_design_window(self): common.pin_design_window = not common.pin_design_window if common.pin_design_window != self._t_pin_design_window.IsToggled(): self._t_pin_design_window.Toggle() self.toolbar.Realize() self._m_pin_design_window.Check(common.pin_design_window) toplevel = self._get_toplevel() if not toplevel or not toplevel.widget: return frame = toplevel.widget.GetTopLevelParent() if not isinstance(frame, wx.Frame): return style = frame.GetWindowStyle() if common.pin_design_window: frame.SetWindowStyle( style | wx.STAY_ON_TOP) elif style & wx.STAY_ON_TOP: frame.ToggleWindowStyle(wx.STAY_ON_TOP) if wx.Platform=='__WXMSW__': frame.Iconize(True) frame.Iconize(False) else: toplevel.widget.Raise()
Example #8
Source File: panel.py From wxGlade with MIT License | 6 votes |
def create_widget(self): if self.widget: # re-creating -> use old frame win = self.widget.GetTopLevelParent() else: style = wx.DEFAULT_FRAME_STYLE if common.pin_design_window: style |= wx.STAY_ON_TOP win = wx.Frame( common.main, -1, misc.design_title(self.name), size=(400, 300), style=style ) import os, compat icon = compat.wx_EmptyIcon() xpm = os.path.join(config.icons_path, 'panel.xpm') icon.CopyFromBitmap(misc.get_xpm_bitmap(xpm)) win.SetIcon(icon) win.Bind(wx.EVT_CLOSE, self.hide_widget) # CLOSE event of the frame, not the panel if wx.Platform == '__WXMSW__': win.CentreOnScreen() if self.scrollable: self.widget = wx.ScrolledWindow(win, self.id, style=0) else: self.widget = wx.Panel(win, self.id, style=0) self.widget.Bind(wx.EVT_ENTER_WINDOW, self.on_enter) self.widget.GetBestSize = self.get_widget_best_size #self.widget.SetSize = win.SetSize
Example #9
Source File: WinUsb.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def CheckAddOnFiles(self): neededFiles = self.GetNeededFiles() if len(neededFiles) == 0: return True if not eg.CallWait(self.ShowDownloadMessage): return False stopEvent = threading.Event() wx.CallAfter(eg.TransferDialog, None, neededFiles, stopEvent) stopEvent.wait() neededFiles = self.GetNeededFiles() if neededFiles: eg.CallWait( wx.MessageBox, Text.downloadFailedMsg, caption=Text.dialogCaption % self.plugin.name, style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP, parent=eg.document.frame ) return False return True
Example #10
Source File: UsbConnect.py From meerk40t with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Terminal.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_TASKBAR | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((915, 424)) self.text_main = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY) self.text_entry = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT_ENTER, self.on_entry, self.text_entry) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self) self.pipe = None
Example #11
Source File: EngraveProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: EngraveProperty.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((305, 216)) self.spin_speed_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "20.0", min=0.0, max=240.0) self.spin_power_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "1000.0", min=0.0, max=1000.0) self.checkbox_custom_d_ratio = wx.CheckBox(self, wx.ID_ANY, _("Custom D-Ratio")) self.spin_speed_dratio = wx.SpinCtrlDouble(self, wx.ID_ANY, "0.261", min=0.0, max=1.0) self.checkbox_custom_accel = wx.CheckBox(self, wx.ID_ANY, _("Acceleration Override")) self.slider_accel = wx.Slider(self, wx.ID_ANY, 1, 1, 4, style=wx.SL_AUTOTICKS | wx.SL_LABELS) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_CHECKBOX, self.on_check_custom_d_ratio, self.checkbox_custom_d_ratio) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_TEXT, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_CHECKBOX, self.on_check_custom_accel, self.checkbox_custom_accel) self.Bind(wx.EVT_COMMAND_SCROLL, self.on_slider_accel, self.slider_accel) self.operation = None self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #12
Source File: ImageProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: ImageProperty.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((276, 218)) self.spin_step_size = wx.SpinCtrl(self, wx.ID_ANY, "1", min=1, max=63) self.combo_dpi = wx.ComboBox(self, wx.ID_ANY, choices=["1000", "500", "333", "250", "200", "166", "142", "125", "111", "100"], style=wx.CB_DROPDOWN) self.text_x = wx.TextCtrl(self, wx.ID_ANY, "") self.text_y = wx.TextCtrl(self, wx.ID_ANY, "") self.text_width = wx.TextCtrl(self, wx.ID_ANY, "") self.text_height = wx.TextCtrl(self, wx.ID_ANY, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRL, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_COMBOBOX, self.on_combo_dpi, self.combo_dpi) self.Bind(wx.EVT_TEXT, self.on_text_x, self.text_x) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_x, self.text_x) self.Bind(wx.EVT_TEXT, self.on_text_y, self.text_y) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_y, self.text_y) self.Bind(wx.EVT_TEXT, self.on_text_width, self.text_width) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_width, self.text_width) self.Bind(wx.EVT_TEXT, self.on_text_height, self.text_height) self.Bind(wx.EVT_TEXT_ENTER, self.on_text_height, self.text_height) # end wxGlade self.image_element = None self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #13
Source File: About.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: About.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((699, 442)) self.bitmap_button_1 = wx.BitmapButton(self, wx.ID_ANY, icon_meerk40t.GetBitmap()) self.__set_properties() self.__do_layout() # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #14
Source File: BufferView.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: BufferView.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((697, 584)) self.text_buffer_length = wx.TextCtrl(self, wx.ID_ANY, "") self.text_buffer_info = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_CHARWRAP | wx.TE_MULTILINE) self.__set_properties() self.__do_layout() # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #15
Source File: DeviceManager.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: DeviceManager.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) self.SetSize((707, 337)) self.devices_list = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES) self.new_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_plus_50.GetBitmap()) self.remove_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_trash_50.GetBitmap()) self.device_properties_button = wx.BitmapButton(self, wx.ID_ANY, icons8_administrative_tools_50.GetBitmap()) self.move_item_up_button = wx.BitmapButton(self, wx.ID_ANY, icons8up.GetBitmap()) self.move_item_down_button = wx.BitmapButton(self, wx.ID_ANY, icons8_down.GetBitmap()) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.devices_list) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_list_item_activated, self.devices_list) self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_list_right_click, self.devices_list) self.Bind(wx.EVT_BUTTON, self.on_button_new, self.new_device_button) self.Bind(wx.EVT_BUTTON, self.on_button_remove, self.remove_device_button) self.Bind(wx.EVT_BUTTON, self.on_button_properties, self.device_properties_button) self.Bind(wx.EVT_BUTTON, self.on_button_up, self.move_item_up_button) self.Bind(wx.EVT_BUTTON, self.on_button_down, self.move_item_down_button) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #16
Source File: CutProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: CutProperty.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((305, 216)) self.spin_speed_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "10.0", min=0.0, max=240.0) self.spin_power_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "1000.0", min=0.0, max=1000.0) self.checkbox_custom_d_ratio = wx.CheckBox(self, wx.ID_ANY, _("Custom D-Ratio")) self.spin_speed_dratio = wx.SpinCtrlDouble(self, wx.ID_ANY, "0.261", min=0.0, max=1.0) self.checkbox_custom_accel = wx.CheckBox(self, wx.ID_ANY, _("Acceleration Override")) self.slider_accel = wx.Slider(self, wx.ID_ANY, 1, 1, 4, style=wx.SL_AUTOTICKS | wx.SL_LABELS) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_CHECKBOX, self.on_check_custom_d_ratio, self.checkbox_custom_d_ratio) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_TEXT, self.on_spin_speed_dratio, self.spin_speed_dratio) self.Bind(wx.EVT_CHECKBOX, self.on_check_custom_accel, self.checkbox_custom_accel) self.Bind(wx.EVT_COMMAND_SCROLL, self.on_slider_accel, self.slider_accel) self.operation = None self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #17
Source File: RotarySettings.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: RotarySettings.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((222, 347)) self.checkbox_rotary = wx.CheckBox(self, wx.ID_ANY, _("Rotary")) self.spin_rotary_scaley = wx.SpinCtrlDouble(self, wx.ID_ANY, "1.0", min=0.0, max=5.0) self.spin_rotary_scalex = wx.SpinCtrlDouble(self, wx.ID_ANY, "1.0", min=0.0, max=5.0) self.checkbox_rotary_loop = wx.CheckBox(self, wx.ID_ANY, _("Field Loop")) self.spin_rotary_rotation = wx.SpinCtrlDouble(self, wx.ID_ANY, "360.0", min=0.0, max=20000.0) self.checkbox_rotary_roller = wx.CheckBox(self, wx.ID_ANY, _("Uses Roller")) self.spin_rotary_roller_circumference = wx.SpinCtrlDouble(self, wx.ID_ANY, "50.0", min=0.0, max=800.0) self.spin_rotary_object_circumference = wx.SpinCtrlDouble(self, wx.ID_ANY, "50.0", min=0.0, max=800.0) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_CHECKBOX, self.on_check_rotary, self.checkbox_rotary) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_rotary_scale_y, self.spin_rotary_scaley) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_rotary_scale_y, self.spin_rotary_scaley) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_rotary_scale_x, self.spin_rotary_scalex) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_rotary_scale_x, self.spin_rotary_scalex) self.Bind(wx.EVT_CHECKBOX, self.on_check_rotary_loop, self.checkbox_rotary_loop) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_rotation, self.spin_rotary_rotation) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_rotation, self.spin_rotary_rotation) self.Bind(wx.EVT_CHECKBOX, self.on_check_rotary_roller, self.checkbox_rotary_roller) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_rotary_roller_circumference, self.spin_rotary_roller_circumference) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_rotary_roller_circumference, self.spin_rotary_roller_circumference) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_rotary_object_circumference, self.spin_rotary_object_circumference) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_rotary_object_circumference, self.spin_rotary_object_circumference) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #18
Source File: RasterProperty.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: RasterProperty.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((359, 355)) self.spin_speed_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "200.0", min=0.0, max=500.0) self.spin_power_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "1000.0", min=0.0, max=1000.0) self.spin_step_size = wx.SpinCtrl(self, wx.ID_ANY, "1", min=0, max=63) self.combo_raster_direction = wx.ComboBox(self, wx.ID_ANY, choices=[_("Top To Bottom"), _("Bottom To Top"), _("Right To Left"), _("Left To Right")], style=wx.CB_DROPDOWN) self.spin_overscan_set = wx.SpinCtrlDouble(self, wx.ID_ANY, "20.0", min=0.0, max=1000.0) self.radio_directional_raster = wx.RadioBox(self, wx.ID_ANY, _("Directional Raster"), choices=[_("Bidirectional"), _("Unidirectional")], majorDimension=2, style=wx.RA_SPECIFY_ROWS) self.radio_corner = wx.RadioBox(self, wx.ID_ANY, _("Start Corner"), choices=[" ", " ", " ", " "], majorDimension=2, style=wx.RA_SPECIFY_ROWS) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_speed, self.spin_speed_set) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_power, self.spin_power_set) self.Bind(wx.EVT_SPINCTRL, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_TEXT, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_step, self.spin_step_size) self.Bind(wx.EVT_COMBOBOX, self.on_combo_raster_direction, self.combo_raster_direction) self.Bind(wx.EVT_SPINCTRLDOUBLE, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_TEXT, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_TEXT_ENTER, self.on_spin_overscan, self.spin_overscan_set) self.Bind(wx.EVT_RADIOBOX, self.on_radio_directional, self.radio_directional_raster) self.Bind(wx.EVT_RADIOBOX, self.on_radio_corner, self.radio_corner) # end wxGlade self.operation = None self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #19
Source File: Settings.py From meerk40t with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Preferences.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((412, 183)) self.checklist_options = wx.CheckListBox(self, wx.ID_ANY, choices=[ "Invert Mouse Wheel Zoom", "Print Shutdown", ]) self.radio_units = wx.RadioBox(self, wx.ID_ANY, _("Units"), choices=[_("mm"), _("cm"), _("inch"), _("mils")], majorDimension=1, style=wx.RA_SPECIFY_ROWS) from wxMeerK40t import supported_languages choices = [language_name for language_code, language_name, language_index in supported_languages] self.combo_language = wx.ComboBox(self, wx.ID_ANY, choices=choices, style=wx.CB_DROPDOWN) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBOX, self.on_radio_units, self.radio_units) self.Bind(wx.EVT_COMBOBOX, self.on_combo_language, self.combo_language) self.Bind(wx.EVT_CHECKLISTBOX, self.on_checklist_settings, self.checklist_options) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self)
Example #20
Source File: gui.py From report-ng with GNU General Public License v2.0 | 5 votes |
def Always_on_top(self, e): if self.menu_view_t.IsChecked(): self.SetWindowStyle(self.GetWindowStyle() | wx.STAY_ON_TOP) for i in self.children: i.SetWindowStyle(i.GetWindowStyle() | wx.STAY_ON_TOP) else: self.SetWindowStyle(self.GetWindowStyle() & ~wx.STAY_ON_TOP) for i in self.children: i.SetWindowStyle(i.GetWindowStyle() & ~wx.STAY_ON_TOP)
Example #21
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def __init__( self, parent, message, ): if parent is None and eg.document.frame: parent = eg.document.frame wx.Frame.__init__(self, parent, -1, eg.APP_NAME, wx.DefaultPosition, style=wx.RAISED_BORDER| wx.STAY_ON_TOP) self.SetBackgroundColour(wx.NullColour) sizer = wx.BoxSizer(wx.HORIZONTAL) bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_CMN_DIALOG, (32, 32)) staticBitmap = wx.StaticBitmap(self, -1, bmp) staticBitmap2 = wx.StaticBitmap(self, -1, bmp) staticText = wx.StaticText(self, -1, message) fnt = staticText.GetFont() fnt.SetPointSize(13) staticText.SetFont(fnt) sizer.Add(staticBitmap, 0, wx.ALL, 12) sizer.Add(staticText,0,wx.ALIGN_CENTER) sizer.Add(staticBitmap2, 0, wx.ALL, 12) self.SetSizerAndFit(sizer) self.CenterOnParent() self.Show() self.Update() #===============================================================================
Example #22
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def __init__(self): wx.Frame.__init__( self, None, -1, 'MPC_menu', style = wx.STAY_ON_TOP|wx.SIMPLE_BORDER ) self.flag = False self.monitor = 0 self.oldMenu = [] self.messStack = []
Example #23
Source File: Core.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def MessageBox(message, caption=eg.APP_NAME, style=wx.OK, parent=None): if parent is None: style |= wx.STAY_ON_TOP dialog = eg.MessageDialog(parent, message, caption, style) result = dialog.ShowModal() dialog.Destroy() return result
Example #24
Source File: WinUsb.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def ShowRestartMessage(self): res = wx.MessageBox( Text.restartMsg, caption=eg.APP_NAME, style=wx.YES_NO | wx.ICON_QUESTION | wx.STAY_ON_TOP, parent=eg.document.frame ) if res == wx.YES: eg.app.Restart()
Example #25
Source File: WinUsb.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def ShowDownloadMessage(self): return wx.YES == wx.MessageBox( Text.downloadMsg % self.plugin.name, caption=Text.dialogCaption % self.plugin.name, style=wx.YES_NO | wx.ICON_QUESTION | wx.STAY_ON_TOP, parent=eg.document.frame )
Example #26
Source File: WinUsb.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def InstallDriver(cls): while True: with cls.installThreadLock: if cls.installQueue.empty(): cls.installThread = None return self = cls.installQueue.get() if wx.YES != eg.CallWait( wx.MessageBox, Text.installMsg % self.plugin.name, caption=Text.dialogCaption % self.plugin.name, style=wx.YES_NO | wx.ICON_QUESTION | wx.STAY_ON_TOP, parent=eg.document.frame ): continue if not self.CheckAddOnFiles(): continue self.CreateInf() result = -1 cmdLine = '"%s" /f /lm' % join(INSTALLATION_ROOT, "dpinst.exe") try: result = ExecAs( "subprocess", eg.WindowsVersion >= 'Vista' or not IsAdmin(), "call", cmdLine.encode('mbcs'), ) except WindowsError, exc: #only silence "User abort" if exc.winerror != 1223: raise if result == 1: eg.actionThread.Call(self.plugin.info.Start)
Example #27
Source File: frame.py From wxGlade with MIT License | 5 votes |
def create_widget(self): parent = None style = self.style if common.pin_design_window: style |= wx.STAY_ON_TOP self.widget = wx.Frame(parent, self.id, self.title, style=style) self._set_widget_icon()
Example #28
Source File: misc.py From wxGlade with MIT License | 5 votes |
def disable_stay_on_top(widget): # used like 'with parent and parent.frozen() or dummy_contextmanager() restore = False tl = get_toplevel_parent(widget) if isinstance(tl, wx.Frame) and tl.GetWindowStyle() & wx.STAY_ON_TOP: tl.ToggleWindowStyle(wx.STAY_ON_TOP) restore = True yield if restore: tl.ToggleWindowStyle(wx.STAY_ON_TOP)
Example #29
Source File: control.py From atbswp with GNU General Public License v3.0 | 5 votes |
def always_on_top(self, event): """Toggle the always on top setting.""" current_value = settings.CONFIG['DEFAULT']['Always On Top'] style = self.main_dialog.GetWindowStyle() self.main_dialog.SetWindowStyle(style ^ wx.STAY_ON_TOP) settings.CONFIG['DEFAULT']['Always On Top'] = str(not current_value)
Example #30
Source File: EngineWx.py From p2ptv-pi with MIT License | 5 votes |
def on_error(self, errmsg, exit = False): if self.bgapp is None: title = 'Error' else: title = self.bgapp.appname + ' Error' dlg = wx.MessageDialog(None, errmsg, title, wx.OK | wx.ICON_ERROR | wx.STAY_ON_TOP) result = dlg.ShowModal() dlg.Destroy() if exit: self.ExitMainLoop()