Python wx 模块,DEFAULT 实例源码

我们从Python开源项目中,提取了以下39个代码示例,用于说明如何使用wx.DEFAULT

项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _post_processing_task_started(self):
        """Show a 'processing' message on the UI while the post processing task is executing."""
        pub.unsubscribe(self._post_processing_task_started, RunUploaderTopics.started_post_processing)
        pub.subscribe(self._post_processing_task_completed, RunUploaderTopics.finished_post_processing)
        pub.subscribe(self._post_processing_task_failed, RunUploaderTopics.failed_post_processing)
        logging.info("Post-processing started, updating UI.")

        self.Freeze()
        self._post_processing_sizer = wx.BoxSizer(wx.HORIZONTAL)
        self._post_processing_placeholder = ProcessingPlaceholderText(self)
        self._post_processing_placeholder.SetFont(wx.Font(pointSize=18, family=wx.FONTFAMILY_DEFAULT, style=wx.NORMAL, weight=wx.FONTWEIGHT_BOLD, face="Segoe UI Symbol"))
        self._post_processing_text = wx.StaticText(self, label="Executing post-processing task.")
        self._post_processing_text.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
        self._post_processing_text.Wrap(350)
        self._post_processing_text.SetToolTipString("Executing command `{}`.".format(read_config_option("completion_cmd")))
        self._post_processing_sizer.Add(self._post_processing_text, flag=wx.RIGHT, border=5, proportion=1)
        self._post_processing_sizer.Add(self._post_processing_placeholder, flag=wx.LEFT, border=5, proportion=0)

        self._sizer.Insert(0, self._post_processing_sizer, flag=wx.EXPAND | wx.ALL, border=5)
        self.Layout()
        self.Thaw()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: Login.__set_properties
        self.SetTitle("Login")
        #_icon = wx.EmptyIcon()
        #_icon.CopyFromBitmap(wx.Bitmap("/media/f67bc164-f440-4c0f-9e9b-3ad70ff1adc2/home/asif/Desktop/waiter animation/2.gif", wx.BITMAP_TYPE_ANY))
        #self.SetIcon(_icon)
        self.SetSize((462, 239))
        self.SetFocus()
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((185, 30))
        self.button_1.SetMinSize((85, 35))
        self.button_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Ubuntu"))
        self.button_2.SetMinSize((85, 35))
        self.button_2.Disable()
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: chng_pass.__set_properties
        self.SetTitle("Change Password")
        self.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_3.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetMinSize((180, 32))
        self.combo_box_1.SetSelection(0)
        self.label_4.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((180, 33))
        self.label_5.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_2.SetMinSize((180, 33))
        self.label_6.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_3.SetMinSize((180, 33))
        self.button_1.SetMinSize((85, 33))
        self.button_2.SetMinSize((85, 33))
        self.button_2.Enable(False)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: consolidated_report.__set_properties
        self.SetTitle("Consolidated Report")
        self.SetSize((420, 550))
        self.combo_box_1.SetSelection(0)
        self.combo_box_2.SetSelection(0)
        self.combo_box_3.SetSelection(0)
        self.combo_box_4.SetSelection(0)
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.check_list_box_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.button_1.SetMinSize((85, 32))
        self.button_2.SetMinSize((85, 32))

        self.checkbox_1.SetValue(1)
        self.checkbox_2.SetValue(1)
        self.checkbox_3.SetValue(1)
        self.checkbox_4.SetValue(1)
        self.button_2.Enable(False)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("Promotion List")
        self.SetSize((450, 350))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_2.SetSelection(0)

        self.button_1.SetMinSize((90, 35))
        self.button_2.SetMinSize((90, 35))
        self.button_2.Enable(False)
        #self.label_4.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        #self.combo_box_4.SetSelection(0)

        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: Institution.__set_properties
        self.SetTitle("Institution")
        self.SetSize((550, 303))
        self.SetFocus()
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_2.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_5.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_5.SetMinSize((250, 27))
        self.label_4.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_6.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))

        self.label_6.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((250, 27))
        self.label_7.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_2.SetMinSize((250, 27))
        self.label_8.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_3.SetMinSize((250, 27))
        self.button_1.SetMinSize((80, 33))
        self.button_2.SetMinSize((80, 33))
        # end wxGlade
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _settings_changed(self, api=None):
        """Reset the main display and attempt to connect to the server
           whenever the connection settings may have changed.

        Args:
            api: A placeholder for a complete api that's passed when the event is fired.
        """

        # before doing anything, clear all of the children from the sizer and
        # also delete any windows attached (Buttons and stuff extend from Window!)
        self._sizer.Clear(deleteWindows=True)
        # and clear out the list of discovered runs that we might be uploading to the server.
        self._discovered_runs = []
        # initialize the invalid sheets panel so that it can listen for events
        # before directory scanning starts, but hide it until we actually get
        # an error raised by the validation part.
        self._invalid_sheets_panel = InvalidSampleSheetsPanel(self, self._get_default_directory())
        self._invalid_sheets_panel.Hide()

        should_monitor_directory = read_config_option("monitor_default_dir", expected_type=bool, default_value=False)

        if should_monitor_directory:
            automatic_upload_status_sizer = wx.BoxSizer(wx.HORIZONTAL)
            auto_upload_enabled_text = wx.StaticText(self, label=u"? Automatic upload enabled.")
            auto_upload_enabled_text.SetFont(wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.BOLD))
            auto_upload_enabled_text.SetForegroundColour(wx.Colour(51, 102, 255))
            auto_upload_enabled_text.SetToolTipString("Monitoring {} for CompletedJobInfo.xml".format(self._get_default_directory()))

            self._sizer.Add(auto_upload_enabled_text, flag=wx.ALIGN_CENTER | wx.ALL, border=5)
            logging.info("Going to monitor default directory [{}] for new runs.".format(self._get_default_directory()))
            # topics to handle when monitoring a directory for automatic upload
            pub.subscribe(self._prepare_for_automatic_upload, DirectoryMonitorTopics.new_run_observed)
            pub.subscribe(self._start_upload, DirectoryMonitorTopics.finished_discovering_run)

            threading.Thread(target=monitor_directory, kwargs={"directory": self._get_default_directory()}).start()

       # run connecting in a different thread so we don't freeze up the GUI
        threading.Thread(target=self._connect_to_irida).start()
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _handle_connection_error(self, error_message=None):
        """Handle connection errors that might be thrown when initially connecting to IRIDA.

        Args:
            error_message: A more detailed error message than "Can't connect"
        """

        logging.error("Handling connection error.")

        self.Freeze()

        connection_error_sizer = wx.BoxSizer(wx.HORIZONTAL)
        connection_error_header = wx.StaticText(self, label=u"? Uh-oh. I couldn't to connect to IRIDA.")
        connection_error_header.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
        connection_error_header.SetForegroundColour(wx.Colour(255, 0, 0))
        connection_error_header.Wrap(350)
        connection_error_sizer.Add(connection_error_header, flag=wx.LEFT | wx.RIGHT, border=5)

        self._sizer.Add(connection_error_sizer, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
        if error_message:
            self._sizer.Add(wx.StaticText(self, label=wordwrap(error_message, 350, wx.ClientDC(self))), flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)

        open_settings_button = wx.Button(self, label="Open Settings")
        self.Bind(wx.EVT_BUTTON, self._parent._open_settings, id=open_settings_button.GetId())
        self._sizer.Add(open_settings_button, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)

        self.Layout()
        self.Thaw()
        pub.unsubscribe(self._handle_connection_error, APIConnectorTopics.connection_error_topic)
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _finished_loading(self):
        """Update the display when the run scan is finished.

        When the `DirectoryScannerTopics.finished_run_scan` topic is received, add
        the upload button to the page so that the user can start the upload.
        """
        if not self._invalid_sheets_panel.IsShown():
            self.Freeze()
            if self._discovered_runs:
                upload_button = wx.Button(self, label="Upload")
                self._upload_sizer.Add(upload_button, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
                self.Bind(wx.EVT_BUTTON, self._start_upload, id=upload_button.GetId())
            else:
                all_uploaded_sizer = wx.BoxSizer(wx.HORIZONTAL)
                all_uploaded_header = wx.StaticText(self, label=u"? All sample sheets uploaded.")
                all_uploaded_header.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
                all_uploaded_header.SetForegroundColour(wx.Colour(51, 204, 51))
                all_uploaded_header.Wrap(350)
                all_uploaded_sizer.Add(all_uploaded_header, flag=wx.LEFT | wx.RIGHT, border=5)

                self._sizer.Add(all_uploaded_sizer, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)

                all_uploaded_details = wx.StaticText(self, label="I scanned {}, but I didn't find any sample sheets that weren't already uploaded. Click 'Scan again' to try finding new runs.".format(self._get_default_directory()))
                all_uploaded_details.Wrap(350)

                self._sizer.Add(all_uploaded_details, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)

                scan_again = wx.Button(self, label="Scan again")
                self._sizer.Add(scan_again, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
                self.Bind(wx.EVT_BUTTON, self._settings_changed, id=scan_again.GetId())

            self.Layout()
            self.Thaw()
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _upload_terminated(self, label, colour, tooltip):
        """Stop the timer and hide self when the upload is has terminated."""

        self._timer.Stop()
        self.Freeze()
        status_label = wx.StaticText(self, label=label)
        status_label.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD))
        status_label.SetForegroundColour(colour)
        status_label.SetToolTipString(tooltip)
        self._sizer.Add(status_label, flag=wx.EXPAND | wx.RIGHT, border=5)
        if self._progress is not None:
            self._progress.Destroy()
        self.Layout()
        self.Thaw()
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def _upload_failed(self, exception=None):
        """Update the display when the upload has failed.

        Args:
            exception: the exception that caused the failure.
        """

        pub.unsubscribe(self._upload_failed, self._run.upload_failed_topic)
        pub.unsubscribe(self._handle_progress, self._run.upload_progress_topic)
        pub.unsubscribe(self._upload_complete, self._run.upload_completed_topic)

        self.Freeze()
        self._timer.Stop()
        self._progress_text.Destroy()
        self._progress.Destroy()
        error_label = wx.StaticText(self, label=u"? Yikes!")
        error_label.SetForegroundColour(wx.Colour(255, 0, 0))
        error_label.SetFont(wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.BOLD))
        detailed_error_label = wx.StaticText(self, label="The IRIDA server failed to accept the upload. You can try again by clicking the 'Try again' button below. If the problem persists, please contact an IRIDA administrator.".format(str(exception)))
        detailed_error_label.Wrap(350)

        self._sizer.Insert(0, detailed_error_label, flag=wx.EXPAND | wx.ALL, border=5)
        self._sizer.Insert(0, error_label, flag=wx.EXPAND | wx.ALL, border=5)

        self.Layout()
        self.Thaw()
项目:irida-miseq-uploader    作者:phac-nml    | 项目源码 | 文件源码
def __init__(self, parent, *args, **kwargs):
        wx.StaticText.__init__(self, parent, *args, **kwargs)
        self._timer = wx.Timer(self)
        self._current_char = 0

        # this is the only font face on windows that actually renders the clock faces correctly.
        self.SetFont(wx.Font(pointSize=wx.DEFAULT, family=wx.FONTFAMILY_DEFAULT, style=wx.NORMAL, weight=wx.FONTWEIGHT_NORMAL, face="Segoe UI Symbol"))

        self.Bind(wx.EVT_TIMER, self._update_progress_text, self._timer)
        self.Restart()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def GenerateMethodButtonSizer(self):
        normal_bt_font = wx.Font(faces["size"] / 3,    wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
        mouseover_bt_font = wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"], underline=True)

        msizer = wx.BoxSizer(wx.HORIZONTAL)

        for confnode_method in self.Controler.ConfNodeMethods:
            if "method" in confnode_method and confnode_method.get("shown", True):
                button = GenBitmapTextButton(self.Editor,
                                             bitmap=GetBitmap(confnode_method.get("bitmap", "Unknown")),
                                             label=confnode_method["name"],
                                             style=wx.NO_BORDER)
                button.SetFont(normal_bt_font)
                button.SetToolTipString(confnode_method["tooltip"])
                if confnode_method.get("push", False):
                    button.Bind(wx.EVT_LEFT_DOWN, self.GetButtonCallBackFunction(confnode_method["method"], True))
                else:
                    button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode_method["method"]), button)
                # a fancy underline on mouseover

                def setFontStyle(b, s):
                    def fn(event):
                        b.SetFont(s)
                        b.Refresh()
                        event.Skip()
                    return fn
                button.Bind(wx.EVT_ENTER_WINDOW, setFontStyle(button, mouseover_bt_font))
                button.Bind(wx.EVT_LEAVE_WINDOW, setFontStyle(button, normal_bt_font))
                # hack to force size to mini
                if not confnode_method.get("enabled", True):
                    button.Disable()
                msizer.AddWindow(button, flag=wx.ALIGN_CENTER)
        return msizer
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("Smart School")
        self.SetSize((450, 350))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_2.SetSelection(0)
        self.label_3.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_3.SetSelection(0)        
        self.label_4.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_4.SetSelection(0)

        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: working_days.__set_properties
        self.SetTitle("working_days")
        self.SetSize((320, 350))
        self.label_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetMinSize((150, 29))
        self.label_5.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((75, 33))
        self.text_ctrl_2.SetMinSize((75, 33))
        self.text_ctrl_3.SetMinSize((75, 33))
        self.button_1.SetMinSize((80, 33))
        self.button_2.SetMinSize((80, 33))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: Institution.__set_properties
        self.SetBackgroundColour(wx.Colour(47, 47, 47))
        self.SetTitle("Institution")
        self.SetSize((550, 303))
        self.SetFocus()
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_2.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_5.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_5.SetMinSize((250, 27))
        self.label_4.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_6.SetFont(wx.Font(7, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))

        self.label_6.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((250, 27))
        self.label_7.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_2.SetMinSize((250, 27))
        self.label_8.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_3.SetMinSize((250, 27))
        self.button_1.SetMinSize((80, 33))
        self.button_2.SetMinSize((80, 33))


        self.button_1.SetBackgroundColour(wx.Colour(33, 137, 33))
        self.button_1.SetForegroundColour(wx.Colour(255, 255, 255))
        self.button_2.SetBackgroundColour(wx.Colour(33, 137, 33))
        self.button_2.SetForegroundColour(wx.Colour(255, 255, 255))

        self.label_1.SetForegroundColour(wx.Colour(255, 255, 255))
        self.label_2.SetForegroundColour(wx.Colour(255, 255, 255))
        self.label_4.SetForegroundColour(wx.Colour(255, 255, 255))
        self.label_6.SetForegroundColour(wx.Colour(255, 255, 255))
        self.label_7.SetForegroundColour(wx.Colour(255, 255, 255))
        self.label_8.SetForegroundColour(wx.Colour(255, 255, 255))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: sampoorna_win.__set_properties
        self.SetTitle(_("Import from Sampoorna"))
        self.SetSize((894, 640))
        self.label_1.SetForegroundColour(wx.Colour(204, 50, 50))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_2.SetForegroundColour(wx.Colour(95, 159, 159))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_3.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_3.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_user.SetMinSize((250, 35))
        self.label_4.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_4.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_passw.SetMinSize((250,35))
        self.panel_1.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_next.SetMinSize((100, 35))
        self.login_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.login_pane.SetFocus()
        self.checkbox_8.SetMinSize((100, 30))
        self.checkbox_9.SetMinSize((100, 30))
        self.checkbox_10.SetMinSize((120, 30))
        self.panel_3.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_next_copy_copy.SetMinSize((100, 35))
        self.button_next_copy.SetMinSize((100, 35))
        self.standard_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.standard_pane.Hide()
        self.progresss_total.SetMinSize((400, 30))
        self.progress_each.SetMinSize((400, 30))
        self.text_ctrl_1.SetMinSize((450, 400))
        self.text_ctrl_1.SetBackgroundColour(wx.Colour(204, 204, 204))
        self.text_ctrl_1.SetForegroundColour(wx.Colour(17, 17, 71))
        self.text_ctrl_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.button_finished.SetMinSize((100, 35))
        self.panel_2.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.report_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: sampoorna_win.__set_properties
        self.SetTitle(_("Import from Sampoorna"))
        self.SetSize((894, 640))
        self.label_1.SetForegroundColour(wx.Colour(204, 50, 50))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_2.SetForegroundColour(wx.Colour(95, 159, 159))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_3.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_3.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_user.SetMinSize((250, 35))
        self.label_4.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_4.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_passw.SetMinSize((250,35))
        self.panel_1.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_next.SetMinSize((100, 35))
        self.login_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.login_pane.SetFocus()
        self.checkbox_8.SetMinSize((100, 30))
        self.checkbox_9.SetMinSize((100, 30))
        self.checkbox_10.SetMinSize((120, 30))
        self.panel_3.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_previous.SetMinSize((100, 35))
        self.button_proceed.SetMinSize((100, 35))
        self.standard_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.standard_pane.Hide()
        self.progresss_total.SetMinSize((400, 30))
        self.progress_each.SetMinSize((400, 30))
        self.button_finished.SetMinSize((100, 35))
        self.panel_2.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.report_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        '''self.report_pane.Hide()
        self.button_finished.Hide()
        self.button_next.Disable()
        self.button_proceed.Disable()
        '''
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: delete.__set_properties
        self.SetTitle("Delete Students")


        self.SetBackgroundColour(THEME.WINDOW_BG_COLOR)
        self.SetForegroundColour(THEME.WINDOW_FG_COLOR)

        self.panel_1.SetBackgroundColour(THEME.WINDOW_BG_COLOR)
        self.panel_1.SetForegroundColour(THEME.WINDOW_FG_COLOR)
        self.panel_2.SetBackgroundColour(THEME.WINDOW_BG_COLOR)
        self.button_close.SetBackgroundColour(THEME.BUTTON_BG_COLOR_GREEN)
        self.button_close.SetForegroundColour(THEME.BUTTON_FG_COLOR_WHITE)        
        self.button_proceed.SetBackgroundColour(THEME.BUTTON_BG_COLOR_GREEN)
        self.button_proceed.SetForegroundColour(THEME.BUTTON_FG_COLOR_WHITE)
        self.label_1.SetForegroundColour(THEME.LABEL_FG_COLOR_WHITE)
        #self.panel_2.SetForegroundColour(theme.BUTTON_BG_COLOR)

        self.SetSize((749, 710))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 1, ""))
        self.check_list_box_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))

        self.static_line_2.SetMinSize((678, 5))
        self.button_close.SetMinSize(THEME.BUTTON_SIZE_NORMAL)
        self.button_proceed.SetMinSize(THEME.BUTTON_SIZE_NORMAL)
        self.combo_box_1.SetMinSize(THEME.COMBO_SIZE_NORMAL)
        self.combo_box_2.SetMinSize(THEME.COMBO_SIZE_NORMAL)
        self.combo_box_3.SetMinSize(THEME.COMBO_SIZE_NORMAL)


        self.panel_2.SetScrollRate(10, 10)

        self.combo_box_1.SetSelection(0)
        self.combo_box_2.SetSelection(0)
        self.combo_box_3.SetSelection(0)

        self.button_proceed.Enable(False)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: disclaimer_win.__set_properties
        self.SetTitle(("Smart School"))
        self.SetSize((474, 584))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.button_disagree.SetMinSize((95, 33))
        self.button_agree.SetMinSize((95, 33))
        self.text_ctrl_1.SetValue(self.text)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: promote.__set_properties
        self.SetTitle("Promote")
        self.SetSize((749, 710))
        self.label_10.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.static_line_1.SetMinSize((4, 173))
        self.label_11.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.check_list_box_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.static_line_2.SetMinSize((678, 5))
        self.button_cancel.SetMinSize((85, 33))
        self.button_proceed.SetMinSize((85, 33))
        self.panel_2.SetScrollRate(10, 10)


        self.combo_box_1.SetSelection(0)
        self.combo_box_2.SetSelection(0)
        self.combo_box_3.SetSelection(0)
        self.combo_box_4.SetSelection(0)
        self.combo_box_5.SetSelection(0)
        self.combo_box_6.SetSelection(0)

        self.combo_box_4.Enable(False)
        self.combo_box_5.Enable(False)
        self.combo_box_6.Enable(False)
        self.button_proceed.Enable(False)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: working_days.__set_properties
        self.SetTitle("working_days")
        self.SetSize((320, 350))
        self.label_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetMinSize((150, 29))
        self.label_5.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.SetMinSize((75, 33))
        self.text_ctrl_2.SetMinSize((75, 33))
        self.text_ctrl_3.SetMinSize((75, 33))
        self.button_1.SetMinSize((80, 33))
        self.button_2.SetMinSize((80, 33))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: add_div.__set_properties
        self.SetTitle("Year & Division")
        self.SetSize((600, 500))
        #self.Enable(False)
        self.SetFocus()
        self.label_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.label_2.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_2.SetSelection(0)
        self.list_box_1.SetMinSize((150, 257))
        self.list_box_1.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.list_box_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.button_1.SetMinSize((120, 40))
        self.text_ctrl_1.SetMinSize((90, 33))
        self.text_ctrl_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.text_ctrl_1.Value='Eg: A-K'
        self.text_ctrl_1.SetForegroundColour('#9CA998')
        self.button_2.SetMinSize((120, 40))
        self.button_1.Enable(False)
        self.button_2.Enable(False)
        self.button_3.SetMinSize((85, 35))
        self.panel_1.SetScrollRate(10, 10)


        # end wxGlade
项目:baroness    作者:ulrichknecht    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))

        self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/thanks.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))
        self.bitmap_2 = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap, pos=(10, 10))

        self.label_1 = wx.StaticText(self, wx.ID_ANY, 'bla blub', pos=(120, 50), size=(340, 100))
        self.label_1.SetFont(wx.Font(25, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
        self.label_1.SetForegroundColour("white")
项目:baroness    作者:ulrichknecht    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))
        self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/sorry.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))
        self.bitmap_1.Bind(wx.EVT_LEFT_DOWN, parent.onExit)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, 'bla blub', pos=(100,100))
        self.label_1.SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
项目:baroness    作者:ulrichknecht    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))
        self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/rfid.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))
        self.bitmap_1.Bind(wx.EVT_LEFT_DOWN, parent.onExit)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, 'bla blub', pos=(100,100), size=(100,220))
        self.label_1.SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
项目:baroness    作者:ulrichknecht    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))

        self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/products.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))

        products = get_products()
        buttonids = []
        i = 0
        for product in products:
            if product.isshown:
                #480x320
                self.but = wx.Button(self, id=wx.ID_ANY, label=product.name + u"\n" + u"%0.2f" % product.price, pos=((i%4)*120, int(i/4)*120), size=(120, 120))
                self.but.SetBackgroundColour((255-((i+int(i/4))*20 % 40), (160+((i+int(i/4))*50 % 100)), 0))
                #self.but.SetForegroundColour("#006699")
                self.but.SetFont(wx.Font(23, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
                self.but.Bind(wx.EVT_LEFT_DOWN, parent.onProduct, id=self.but.Id)
                i += 1

        if not settings.onlyOneDrink:
            self.b_less = wx.Button(self, id = wx.ID_ANY, label=u"-", pos=(0,250), size=(120, 70))
            self.b_less.SetFont(wx.Font(60, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
            self.b_less.Bind(wx.EVT_LEFT_DOWN, self.onLess, id=self.b_less.Id)

            self.l_amount = wx.StaticText(self, wx.ID_ANY, "%2d" % 0, pos=(137, 245), style=wx.ALIGN_CENTER)
            self.l_amount.SetFont(wx.Font(50, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Sans"))

            self.b_more = wx.Button(self, id = wx.ID_ANY, label=u"+", pos=(240,250), size=(120, 70))
            self.b_more.SetFont(wx.Font(60, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
            self.b_more.Bind(wx.EVT_LEFT_DOWN, self.onMore, id=self.b_more.Id)

        self.b_exit = wx.Button(self, id = wx.ID_ANY, label=u"x", pos=(360,250), size=(120, 70))
        self.b_exit.SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
        self.b_exit.Bind(wx.EVT_LEFT_DOWN, parent.onExit, id=self.b_exit.Id)

        if i <= 4:
            self.l_user = wx.StaticText(self, wx.ID_ANY, "todo", pos=(20,170), style=wx.ALIGN_CENTER)
        else:
            self.l_user = wx.StaticText(self, wx.ID_ANY, "todo", pos=((i%4)*120+20,170), style=wx.ALIGN_CENTER)
        self.l_user.SetFont(wx.Font(25, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
项目:baroness    作者:ulrichknecht    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))
        self.parent = parent
        self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/users.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))

        users = get_users()
        self.names = list()
        for user in users:
            if user.isshown and not user.onlyrfid:
                self.names.append(user.longname)

        self.but_names = list()
    self.position = 0
    self.lines = 4
    self.items = len(self.names) 

    for i in range(self.lines):
            #480x320
            self.but = wx.lib.platebtn.PlateButton(self, label=self.names[self.position+i] if self.position+i < len(self.names) else "", pos=(3, 3+i*80),
                                                   style=wx.BU_EXACTFIT | wx.lib.platebtn.PB_STYLE_SQUARE)
            self.but.SetSize((365, 74))

            self.but.SetBackgroundColour((255-(i*20 % 40), (160+(i*50 % 100)), 0))
            #self.but.SetForegroundColour("#006699")
            self.but.SetPressColor(wx.Colour(255,255,255,0))
            self.but.SetFont(wx.Font(25, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
            self.but.Bind(wx.EVT_LEFT_DOWN, parent.onUser, id=self.but.Id)
            self.but_names.append(self.but)

        self.b_up = wx.Button(self, id=wx.ID_ANY, label=u"\u25B2", pos=(374, 0), size=(106, 106))
        self.b_up.SetFont(wx.Font(20, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
        self.b_up.Bind(wx.EVT_LEFT_DOWN, self.on_up, id=self.b_up.Id)

        self.b_down = wx.Button(self, id=wx.ID_ANY, label=u"\u25BC", pos=(374, 214), size=(106, 106))
        self.b_down.SetFont(wx.Font(20, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
        self.b_down.Bind(wx.EVT_LEFT_DOWN, self.on_down, id=self.b_down.Id)

        self.b_exit = wx.Button(self, id=wx.ID_ANY, label="X", pos=(374, 107), size=(106, 106))
        self.b_exit.SetFont(wx.Font(20, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
        self.b_exit.Bind(wx.EVT_LEFT_DOWN, parent.onExit, id=self.b_exit.Id)
        self.Layout()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self, parent):
        """Constructor"""
        wx.Panel.__init__(self, parent)

        self.font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL)
        self.label = "I flash a LOT!"
        self.flashingText = wx.StaticText(self, label=self.label)
        self.flashingText.SetFont(self.font)

        self.timer = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.update, self.timer)
        self.timer.Start(1000)
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self, parent):
        """Constructor"""
        wx.Panel.__init__(self, parent)

        self.font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL)
        self.flashingText = wx.StaticText(self, label="I flash a LOT!")
        self.flashingText.SetFont(self.font)

        self.timer = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.update, self.timer)
        self.timer.Start(1000)
项目:mobileinsight-core    作者:mobile-insight    | 项目源码 | 文件源码
def __init__(self, parent, start_time, end_time):
        wx.Dialog.__init__(self, parent, -1)
        sizer = wx.BoxSizer(wx.VERTICAL)
        self.SetTitle("Time Window")
        self.start_label = wx.StaticText(self, -1, label="...", style=wx.BOLD)
        self.end_label = wx.StaticText(self, -1, label="...", style=wx.BOLD)
        self.window_label = wx.StaticText(self, -1, "\t to \t")
        # self.start_label.SetFont(wx.Font(11, wx.DEFAULT, wx.BOLD, wx.NORMAL))
        # self.window_label.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.NORMAL))
        # self.end_label.SetFont(wx.Font(11, wx.DEFAULT, wx.BOLD, wx.NORMAL))

        self.start_label.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_SLANT, wx.FONTWEIGHT_NORMAL))
        self.window_label.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_ITALIC, wx.FONTWEIGHT_NORMAL))
        self.end_label.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_SLANT, wx.FONTWEIGHT_NORMAL))

        labelSizer = wx.BoxSizer(wx.HORIZONTAL)
        labelSizer.Add(self.start_label, 0, wx.ALL | wx.EXPAND, 3)
        labelSizer.Add(self.window_label, wx.ALL, 1)
        labelSizer.Add(self.end_label, 0, wx.ALL | wx.EXPAND, 3)

        self.btns = self.CreateSeparatedButtonSizer(wx.OK | wx.CANCEL)
        start_sizer = wx.BoxSizer(wx.HORIZONTAL)
        start_sizer.Add(wx.StaticText(self, -1, "Start: "), 0, wx.ALL, 1)
        self.start_slider = wx.Slider(
            self, -1, 0, 0, 100, wx.DefaultPosition, (250, -1), wx.SL_HORIZONTAL)
        start_sizer.Add(self.start_slider, 0, wx.ALL | wx.EXPAND, 5)
        self.Bind(wx.EVT_SLIDER, self.start_slider_update, self.start_slider)

        end_sizer = wx.BoxSizer(wx.HORIZONTAL)
        end_sizer.Add(wx.StaticText(self, -1, "End: "), 0, wx.ALL, 1)
        self.end_slider = wx.Slider(
            self, -1, 100, 0, 100, wx.DefaultPosition, (250, -1), wx.SL_HORIZONTAL)
        end_sizer.Add(self.end_slider, 0, wx.ALL | wx.EXPAND, 5)
        self.Bind(wx.EVT_SLIDER, self.end_slider_udpate, self.end_slider)

        self.start_time = start_time
        self.cur_end = end_time
        self.cur_start = self.start_time
        self.unit_seconds = (end_time - start_time).total_seconds() / 100.0

        self.updateUI()
        sizer.Add(labelSizer, 0, wx.ALL | wx.EXPAND, 5)
        sizer.Add(start_sizer, 0, wx.ALL | wx.EXPAND, 5)
        sizer.Add(end_sizer, 0, wx.ALL | wx.EXPAND, 5)
        sizer.Add(self.btns, 0, wx.ALL | wx.EXPAND, 5)
        self.SetSizer(sizer)
        self.Fit()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def OnPrintPage(self, page):
        dc = self.GetDC()
        dc.SetUserScale(1.0, 1.0)
        dc.SetDeviceOrigin(0, 0)
        dc.printing = not self.Preview

        # Get the size of the DC in pixels
        ppiPrinterX, ppiPrinterY = self.GetPPIPrinter()
        ppiScreenX, ppiScreenY = self.GetPPIScreen()
        pw, ph = self.GetPageSizePixels()
        dw, dh = dc.GetSizeTuple()
        Xscale = (float(dw) * float(ppiPrinterX)) / (float(pw) * 25.4)
        Yscale = (float(dh) * float(ppiPrinterY)) / (float(ph) * 25.4)

        fontsize = self.FontSize * Yscale
        text_margin = self.TextMargin * Yscale

        margin_left = self.Margins[0].x * Xscale
        margin_top = self.Margins[0].y * Yscale
        area_width = dw - self.Margins[1].x * Xscale - margin_left
        area_height = dh - self.Margins[1].y * Yscale - margin_top

        dc.SetPen(MiterPen(wx.BLACK))
        dc.SetBrush(wx.TRANSPARENT_BRUSH)
        dc.DrawRectangle(margin_left, margin_top, area_width, area_height)

        dc.SetFont(wx.Font(fontsize, wx.DEFAULT, wx.NORMAL, wx.NORMAL))
        dc.SetTextForeground(wx.BLACK)
        block_name = " - ".join(self.Viewer.GetTagName().split("::")[1:])
        text_width, text_height = dc.GetTextExtent(block_name)
        dc.DrawText(block_name, margin_left, margin_top - text_height - self.TextMargin)
        dc.DrawText(_("Page: %d") % page, margin_left, margin_top + area_height + self.TextMargin)

        # Calculate the position on the DC for centering the graphic
        posX = area_width * ((page - 1) % self.PageGrid[0])
        posY = area_height * ((page - 1) / self.PageGrid[0])

        scaleX = float(area_width) / float(self.PageSize[0])
        scaleY = float(area_height) / float(self.PageSize[1])
        scale = min(scaleX, scaleY)

        # Set the scale and origin
        dc.SetDeviceOrigin(-posX + margin_left, -posY + margin_top)
        dc.SetClippingRegion(posX, posY, self.PageSize[0] * scale, self.PageSize[1] * scale)
        dc.SetUserScale(scale, scale)

        self.Viewer.DoDrawing(dc, True)

        return True
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: student_profie.__set_properties
        self.SetTitle(_("Student Profile"))
        self.label_13.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_14.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_year.SetMinSize((350, 35))
        self.combo_box_class.SetMinSize((350, 35))
        self.label_16.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_17.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_div.SetMinSize((350, 35))
        self.combo_box_name.SetMinSize((350, 35))
        self.combo_box_name.SetSelection(0)
        self.bitmap_photo.SetMinSize((132, 132))
        self.button_add.SetMinSize((129, 38))
        self.button_add.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Ubuntu"))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_3.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_roll.SetMinSize((300, 35))
        self.text_ctrl_name.SetMinSize((300, 35))
        self.text_ctrl_uid.SetMinSize((300, 35))
        self.label_4.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_5.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_6.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.combo_box_gender.SetMinSize((100, 35))
        self.combo_box_gender.SetSelection(0)
        self.text_ctrl_dob.SetMinSize((300, 35))
        self.text_ctrl_category.SetMinSize((300, 35))
        self.label_7.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_8.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_9.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_religion.SetMinSize((300, 35))
        self.text_ctrl_caste.SetMinSize((300, 35))
        self.text_ctrl_language.SetMinSize((300, 35))
        self.label_10.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_11.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_12.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_father.SetMinSize((300, 35))
        self.text_ctrl_mother.SetMinSize((300, 35))
        self.text_ctrl_mobile.SetMinSize((300, 35))
        self.label_18.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_email.SetMinSize((300, 35))
        self.static_line_2.SetMinSize((1130, 10))
        self.button_close.SetMinSize((120, 45))
        self.button_delete.SetMinSize((120, 45))
        self.button_delete.Enable(False)
        self.button_save.SetMinSize((120, 45))
        self.button_save.Enable(False)
        self.panel_1.SetForegroundColour(wx.Colour(165, 42, 42))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: student_profie.__set_properties
        self.SetTitle(_("Student Profile"))
        self.label_13.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_14.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_year.SetMinSize((350, 35))
        self.combo_box_class.SetMinSize((350, 35))
        self.label_16.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_17.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_div.SetMinSize((350, 35))
        self.combo_box_name.SetMinSize((350, 35))
        self.combo_box_name.SetSelection(0)
        self.bitmap_photo.SetMinSize((132, 132))
        self.button_add.SetMinSize((129, 38))
        self.button_add.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Ubuntu"))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_3.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_roll.SetMinSize((300, 35))
        self.text_ctrl_name.SetMinSize((300, 35))
        self.text_ctrl_uid.SetMinSize((300, 35))
        self.label_4.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_5.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_6.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.combo_box_gender.SetMinSize((100, 35))
        self.combo_box_gender.SetSelection(0)
        self.text_ctrl_dob.SetMinSize((300, 35))
        self.text_ctrl_category.SetMinSize((300, 35))
        self.label_7.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_8.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_9.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_religion.SetMinSize((300, 35))
        self.text_ctrl_caste.SetMinSize((300, 35))
        self.text_ctrl_language.SetMinSize((300, 35))
        self.label_10.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_11.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_12.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_father.SetMinSize((300, 35))
        self.text_ctrl_mother.SetMinSize((300, 35))
        self.text_ctrl_mobile.SetMinSize((300, 35))
        self.label_18.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_email.SetMinSize((300, 35))
        self.static_line_2.SetMinSize((1130, 10))
        self.button_close.SetMinSize((120, 45))
        self.button_delete.SetMinSize((120, 45))
        self.button_save.SetMinSize((120, 45))
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: sampoorna_win.__set_properties
        self.SetTitle(("Import from Sampoorna"))
        self.SetSize((894, 700))
        self.label_1.SetForegroundColour(wx.Colour(204, 50, 50))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_2.SetForegroundColour(wx.Colour(95, 159, 159))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_3.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_3.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_user.SetMinSize((250, 35))
        self.label_4.SetForegroundColour(wx.Colour(185, 115, 45))
        self.label_4.SetFont(wx.Font(11, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_passw.SetMinSize((250,35))
        self.panel_1.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_next.SetMinSize((100, 35))
        self.login_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.login_pane.SetFocus()
        self.checkbox_8.SetMinSize((100, 30))
        self.checkbox_9.SetMinSize((100, 30))
        self.checkbox_10.SetMinSize((120, 30))
        self.panel_3.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.button_previous.SetMinSize((100, 35))
        self.button_proceed.SetMinSize((100, 35))
        self.standard_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.standard_pane.Hide()
        self.progresss_total.SetMinSize((400, 30))
        self.label_progress_perc.SetMinSize((400, 30))
        self.text_ctrl_report.SetMinSize((450, 400))
        self.text_ctrl_report.SetBackgroundColour(wx.Colour(204, 204, 204))
        self.text_ctrl_report.SetForegroundColour(wx.Colour(17, 17, 71))
        self.text_ctrl_report.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.button_finished.SetMinSize((100, 35))
        self.panel_2.SetBackgroundColour(wx.Colour(193, 193, 255))
        self.report_pane.SetBackgroundColour(wx.Colour(249, 249, 248))
        self.report_pane.Hide()
        #self.button_finished.Hide()
        #self.label_progress_perc.Hide()
        self.button_next.Disable()
        self.button_proceed.Disable()

        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: MyFrame2.__set_properties
        self.SetTitle("CE & TE Settings")
        self.SetSize((400, 577))
        self.label_14.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_2.SetMinSize((150, 33))
        self.label_1.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_1.SetMinSize((100, 33))
        self.combo_box_1.SetSelection(0)
        self.combo_box_2.SetSelection(0)
        self.static_line_1.SetMinSize((380, 5))
        self.label_12.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.TE.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.ce_1.SetMinSize((50, 23))
        self.te_1.SetMinSize((50, 23))
        self.ce_2.SetMinSize((50, 23))
        self.te_2.SetMinSize((50, 23))
        self.ce_3.SetMinSize((50, 23))
        self.te_3.SetMinSize((50, 23))
        self.ce_4.SetMinSize((50, 23))
        self.te_4.SetMinSize((50, 23))
        self.ce_5.SetMinSize((50, 23))
        self.te_5.SetMinSize((50, 23))
        self.ce_6.SetMinSize((50, 23))
        self.te_6.SetMinSize((50, 23))
        self.ce_7.SetMinSize((50, 23))
        self.te_7.SetMinSize((50, 23))
        self.ce_8.SetMinSize((50, 23))
        self.te_8.SetMinSize((50, 23))
        self.ce_9.SetMinSize((50, 23))
        self.te_9.SetMinSize((50, 23))
        self.ce_10.SetMinSize((50, 23))
        self.te_10.SetMinSize((50, 23))

        self.ce_11.SetMinSize((50, 23))
        self.te_11.SetMinSize((50, 23))
        self.ce_12.SetMinSize((50, 23))
        self.te_12.SetMinSize((50, 23))
        self.ce_13.SetMinSize((50, 23))
        self.te_13.SetMinSize((50, 23))
        self.button_1.SetMinSize((80, 33))
        self.button_2.SetMinSize((80, 33))
        self.button_2.Enabled=False


        self.YEAR=self.STD='Select'
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __set_properties(self):
        # begin wxGlade: student_profie.__set_properties
        self.SetTitle(("Student Profile"))
        self.label_13.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_14.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_year.SetMinSize((350, 35))
        self.combo_box_class.SetMinSize((350, 35))
        self.label_16.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.label_17.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.combo_box_div.SetMinSize((350, 35))
        self.combo_box_adno.SetMinSize((350, 35))
        self.combo_box_adno.SetSelection(0)
        self.bitmap_photo.SetMinSize((132, 132))
        self.button_add.SetMinSize((129, 38))
        self.button_add.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Ubuntu"))
        self.label_1.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_2.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_3.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_roll.SetMinSize((300, 35))
        self.text_ctrl_name.SetMinSize((300, 35))
        self.text_ctrl_uid.SetMinSize((300, 35))
        self.label_4.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_5.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_6.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.combo_box_gender.SetMinSize((100, 35))
        self.combo_box_gender.SetSelection(0)
        self.text_ctrl_dob.SetMinSize((300, 35))
        self.text_ctrl_category.SetMinSize((300, 35))
        self.label_7.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_8.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_9.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_religion.SetMinSize((300, 35))
        self.text_ctrl_caste.SetMinSize((300, 35))
        self.text_ctrl_language.SetMinSize((300, 35))
        self.label_10.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_11.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.label_12.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_father.SetMinSize((300, 35))
        self.text_ctrl_mother.SetMinSize((300, 35))
        self.text_ctrl_mobile.SetMinSize((300, 35))
        self.label_18.SetFont(wx.Font(12, wx.DEFAULT, wx.ITALIC, wx.BOLD, 0, ""))
        self.text_ctrl_email.SetMinSize((300, 35))
        self.static_line_2.SetMinSize((1130, 10))
        self.button_close.SetMinSize((120, 45))
        self.button_delete.SetMinSize((120, 45))
        self.button_delete.Enable(False)
        self.button_save.SetMinSize((120, 45))
        self.button_save.Enable(False)
        self.button_add.Enable(False)
        self.bitmap_photo.Enable(False)    

        # end wxGlade
项目:MechWarfareScoring    作者:artanz    | 项目源码 | 文件源码
def __init__( self, parent, id ):
        wx.Panel.__init__( self, parent )

        self.ScoreServer = parent.ScoreServer
        self.Match = self.ScoreServer.Match
        self.MechList = self.ScoreServer.Match.MechList

        # Create a MatchTimeText
        self.MatchTimerText = MatchTimerText( self, -1, self.Match )
        self.MatchTimerText.SetFont(wx.Font(50, wx.DEFAULT, wx.NORMAL, wx.BOLD))

        # Create a Sizer, NameText, and HPText for each Mech in the match.
        self.MechSizer = []
        self.MechNameText = []
        self.MechHPText = []

        for m in xrange(len(self.MechList)):
            self.MechSizer.append( wx.BoxSizer( wx.HORIZONTAL ) )
            self.MechNameText.append( wx.StaticText( self, -1, self.MechList[m].Name ) )
            self.MechHPText.append( MechHPText( self, -1, self.ScoreServer, self.MechList[m] ) )

            self.MechNameText[m].SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.BOLD))
            self.MechHPText[m].SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.BOLD))

        # Create an overall sizer for the panel.
        self.Sizer = wx.BoxSizer( wx.VERTICAL )

        # Add TimerText to the panel's sizer.
        self.Sizer.Add( self.MatchTimerText, proportion=0, flag=wx.ALL|wx.ALIGN_CENTER, border=10 )
        self.Sizer.Add( wx.StaticLine( self ), 0, wx.ALL|wx.EXPAND, 5 )

        # Add all Mech Sizers to the panel's sizer
        for m in xrange(len(self.MechList)):

            # Insert a "VS" static text between teams if this is not a FFA match.
            if self.Match.MatchType != MWScore.MATCH_FFA:
                if self.MechList[m].Team != self.MechList[m-1].Team and m != 0:
                    vstext = wx.StaticText(self, -1, "VS")
                    vstext.SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.BOLD))
                    self.Sizer.Add( vstext, proportion=0, flag=wx.ALL|wx.ALIGN_CENTER, border=10 )

            self.MechSizer[m].Add( self.MechNameText[m], proportion=0, flag=wx.RIGHT, border=10 )
            self.MechSizer[m].Add( self.MechHPText[m], proportion=0, flag=wx.LEFT, border=10 )

            self.Sizer.Add( self.MechSizer[m], proportion=0, flag=wx.ALL|wx.ALIGN_CENTER, border=10 )

        # Set panel's sizer and fit.
        self.SetSizer( self.Sizer )
        self.Sizer.Fit( parent )

    # Refresh the TimeText and all instances of MechHPText
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        wx.grid.Grid.__init__(self, *args, **kwargs)

        self.Editable = True

        self.AddButton = None
        self.DeleteButton = None
        self.UpButton = None
        self.DownButton = None

        self.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
        self.SetLabelFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
        self.SetSelectionBackground(wx.WHITE)
        self.SetSelectionForeground(wx.BLACK)
        self.DisableDragRowSize()

        self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell)
        self.Bind(wx.grid.EVT_GRID_EDITOR_HIDDEN, self.OnEditorHidden)
        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)