Beispiel #1
0
def set_error(msg):
    set_value(ModifyID.ERROR_TEXT, msg)
Beispiel #2
0
 def filter_callback(sender, filter_str):
     dpg.set_value("csr_filter", filter_str)
Beispiel #3
0
 def timer_callback(refresh=1e-1):
     while True:
         for name, reg in bus.regs.__dict__.items():
             value = reg.read()
             dpg.set_value(item=name, value=f"0x{reg.read():x}")
         time.sleep(refresh)
def change_text(sender, app_data, user_data):
    if (dpg.is_item_hovered(user_data)):
        dpg.set_value(user_data, f"Stop Hovering Me, Go away!!")
    else:
        dpg.set_value(user_data, f"Hover Me!")
Beispiel #5
0
    def execute(self):

        plot_id = self._static_attributes[0].simple_plot
        dpg.set_value(plot_id, self._input_attributes[0].get_data())
        self.finish()
Beispiel #6
0
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(tag='main'):
    dpg.add_progress_bar(label='Progress Bar', tag='progress_bar')

dpg.set_primary_window('main', True)
dpg.show_viewport()

while dpg.is_dearpygui_running():
    dpg.set_value('progress_bar', dpg.get_value('progress_bar') + .001)
    dpg.render_dearpygui_frame()

dpg.destroy_context()
def _set_readonly_fields(id, summary, tags, location):
    set_value(FindID.RECORD_ID, id)
    set_value(FindID.SUMMARY, summary)
    set_value(FindID.TAGS, tags)
    set_value(FindID.READ_ONLY_LOCATION, location)
Beispiel #8
0
def change_text(sender, app_data, user_data):
    dpg.set_value(user_data, f"Mouse Button: {app_data[0]}, Down Time: {app_data[1]} seconds")
Beispiel #9
0
 def callback_update_enddate(self):
     LocalTime = time.localtime()
     dpg.set_value(self.ID_EndYear, str(LocalTime.tm_year))
     dpg.set_value(self.ID_EndMonth, str(LocalTime.tm_mon))
     dpg.set_value(self.ID_EndDay, str(LocalTime.tm_mday))
Beispiel #10
0
 def GetDate(self,Sender,Data):
     # print(Sender)
     # print(Data)
     if Sender == self.ID_BeginDatePicker:
         dpg.set_value(self.ID_BeginYear, Data['year'] + 1900)
         dpg.set_value(self.ID_BeginMonth, Data['month'])
         dpg.set_value(self.ID_BeginDay, Data['month_day'])
     if Sender == self.ID_EndDatePicker:
         dpg.set_value(self.ID_EndYear, Data['year'] + 1900)
         dpg.set_value(self.ID_EndMonth, Data['month'])
         dpg.set_value(self.ID_EndDay, Data['month_day'])
Beispiel #11
0
 def value(self, value: Any) -> None:
     # if isinstance(value, Sequence):
     #     value = list(value)  # DPG only accepts lists for sequence values
     dpgcore.set_value(self.id, value)
Beispiel #12
0
def callback_file(sender, app_data, user_data):
    array = list(app_data["selections"])
    item = ""
    if len(array) > 0:
        item = array[0]
    dpg.set_value(user_data, item)