def _wait_message_gui(self, msg, progr=None, allowclose=False): gap = 20 if self._wait_ui is None: self._btnext.set_enable(False) self._btback.set_enable(False) self._btclose.set_enable(allowclose) self._prepare_main_panel() lbl = gdi.Label() lbl.set_wordwrap(True) lbl.set_position(gap, (_CONTENT_HEIGHT / 2) - 60) lbl.set_size(_CONTENT_WIDTH - (2 * gap), 60) lbl.set_text_align(gdi.TEXT_ALIGN_LEFTTOP) self._pnlmain.add_component(lbl) pbar = gdi.ProgressBar() pbar.set_position(gap, _CONTENT_HEIGHT / 2) pbar.set_size(_CONTENT_WIDTH - (2 * gap), 24) self._pnlmain.add_component(pbar) self._wait_ui = {'label': lbl, 'progress': pbar} else: self._btclose.set_enable(allowclose) lbl = self._wait_ui['label'] pbar = self._wait_ui['progress'] if 'label_value' not in self._wait_ui or self._wait_ui[ 'label_value'] != msg: lbl.set_text(msg) self._wait_ui['label_value'] = msg if progr is None: if 'progress_value' not in self._wait_ui or self._wait_ui[ 'progress_value'] is not None: pbar.set_y(-100) lbl.set_y(0) lbl.set_height(_CONTENT_HEIGHT) lbl.set_text_align(gdi.TEXT_ALIGN_LEFTMIDDLE) self._wait_ui['progress_value'] = None else: if 'progress_value' not in self._wait_ui or self._wait_ui[ 'progress_value'] is None or self._wait_ui[ 'progress_value'] != progr: lbl.set_y((_CONTENT_HEIGHT / 2) - 40) lbl.set_height(30) lbl.set_text_align(gdi.TEXT_ALIGN_LEFTTOP) pbar.set_y(_CONTENT_HEIGHT / 2) pbar.set_percent(progr) self._wait_ui['progress_value'] = progr
ww.add_component(t) rr = gdi.RadioButton() rr.set_text("Yes") rr.set_group("GRP1") rr.set_position(250, 170) ww.add_component(rr) rr = gdi.RadioButton() rr.set_text("No") rr.set_group("GRP1") rr.set_position(250, 210) rr.set_selected(True) ww.add_component(rr) pbr = gdi.ProgressBar() pbr.set_position(250, 250) pbr.set_percent(0.4) ww.add_component(pbr) ''' imp = ImagePanel() imp.set_position(250, 280) imp.set_filename(u"test.bmp") ww.add_component(imp) ''' pl = gdi.Panel() pl.set_position(0, 0) pl.set_size(90, ww.get_height()) pl.set_background_gradient("83e5ff", "FFFFFF", gdi.GRADIENT_DIRECTION_LEFTRIGHT)