How to make vuetify.VDialog movable? #665
Answered
by
jourdain
NimaGhorab
asked this question in
General
-
I have a simple piece of code that contains a button: from trame.app import get_server
from trame.widgets import vuetify
from trame.ui.vuetify import SinglePageLayout
# -----------------------------------------------------------------------------
# Get a server to work with
# -----------------------------------------------------------------------------
server = get_server(client_type = "vue2")
# -----------------------------------------------------------------------------
# GUI
# -----------------------------------------------------------------------------
with SinglePageLayout(server) as layout:
layout.title.set_text("Draggable Dialog")
with layout.content:
with vuetify.VBtn("Open Dialog", style="margin-left: 80px;", click="dialog = true"):
vuetify.VIcon("mdi-open-in-new")
with vuetify.VDialog(v_model=("dialog", False), draggable=True):
with vuetify.VCard():
vuetify.VCardTitle("Draggable Dialog")
vuetify.VTextField(v_model=("text_input", ""), label="Enter some text")
vuetify.VBtn("Close", click="dialog = false")
# -----------------------------------------------------------------------------
# Main
# -----------------------------------------------------------------------------
if __name__ == "__main__":
server.start() When a user clicks the download button, it opens a Vuetify VDialog. |
Beta Was this translation helpful? Give feedback.
Answered by
jourdain
Jan 20, 2025
Replies: 1 comment 4 replies
-
That component does that. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
NimaGhorab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That component does that.
You can see the associated JS code.