Client-Server of Python Server Menu

Dear All,

I am using the example web-project-templates-master that replicate an OpenGL window in the Python server side in a web browser client side. Now, if I want to create a menu with buttons in the server side (Python) how I replicate in the web browser and send back the buttons events to the server. (outside the OpenGL window).

Has VTK something to do that? If not, can anyone give suggestions how to do that over the example web-project-templates-master?

Thanks,

Luís Gonçalves

The template that you are using show you exactly how to do that with the slider and the resolution of the cone.

I tried in “template.html” to put

  <v-icon v-text="Here" v-on:click="resetCamera()" />

instead of

   <v-icon v-text="`$resetCamera`" v-on:click="resetCamera()" />

and the text “Here” do not appear in the panel in the browser.

Can you please point where I can read about how to set links in the panel with pointers to a function in Python on the server? (like above but working)

You should be able to follow the same path for vtk.cone.resolution.update and the slider…

You mean the ICON with identifier HERE does not exist… Yes, that make sense…
If you want to learn Vuetify, you can do so on their website…

I managed to display a existing icon (‘fa4’) that when clicked make an action in the server side (Python).
How to display instead of an existing icon, display text?

You mean you want a button with text rather than an icon? Then use the button component rather than the icon component. The Vuetify documentation is very well done, you should read it.

Maybe try <button>My text is here</button>. And if you want to be fancy and use Vuetify like explained before, try <v-btn>My text is here</v-btn>. Notice the difference between <v-icon /> and <v-btn />. One is for icons (no text), the other is for buttons that can be icon based or text based.

Does it make sense?

I have working the following in template.html

<v-icon v-text="$my_icon" v-on:click="my_icon()" />

but the following do not works:

<v-btn "My text is here" v-on:click="my_icon()"/>

Where I find an example of using v-btn to make an action when pressed?

Yes it make sense. Just read my comment above.

<a>b</a> != <a "b" />

Maybe you need to watch a video on how to write HTML/XML? I’m not sure how I can help you more.

What I want is how I include the event in the v-btn html? The “click”.

How hard was it?

<v-btn v-on:click="myMethod">My text goes here</v-btn>

Guess what, you can even do that with a div

<div @click="myMethod">My text goes here</div>

Thanks. My HTML knowledge is very basic.

Yes I noticed but they are a lot of resources online. If you read the Vuetify documentation what I wrote was in plain site.