-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tagging a dataset from the GUI missing #191
Comments
In the code of the GUI, we have to embed this
|
Look at dataset model in code dtool-lookup-gui/dtool_lookup_gui/models/datasets.py Lines 344 to 363 in 119a45b
and implement |
Add labels dynamically like this: import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
class MainWindow(Gtk.Window):
def __init__(self):
super().__init__(title="Dynamic GTK3 Example")
self.set_border_width(10)
# Set up a vertical box to hold the widgets
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
self.add(self.box)
# Create a button that will add labels dynamically
self.button = Gtk.Button(label="Add Label")
self.button.connect("clicked", self.on_button_clicked)
self.box.pack_start(self.button, True, True, 0)
def on_button_clicked(self, widget):
# Create a new label and add it to the box
label = Gtk.Label(label="New Dynamic Label")
self.box.pack_start(label, True, True, 0)
self.show_all() # Refresh the window to show the new label
# Initialize and run the GTK application
win = MainWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main() |
Done with #362 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: