-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is there a way to edit tab text on the fly?
here a example showing 2 ways how this can be achieved
<zk>
<tabbox>
<tabs>
<tab>
<caption>
<label id="display"
value="DoubleClick to edit, ENTER to save"
onDoubleClick="self.setVisible(false); edit.setValue(self.getValue()); edit.setVisible(true);"
/>
<textbox id="edit" visible="false"
onOK="self.setVisible(false); display.setValue(self.getValue()); display.setVisible(true);"/>
</caption>
</tab>
<tab>
<caption>
<textbox value="Inline Edit" inplace="true"/>
</caption>
</tab>
</tabs>
</tabbox>
</zk>
http://zkfiddle.org/sample/1i5v9eb/1-editable-tab-labels
either showing/hiding a textbox, or using a<textbox inplace="true"/>
Of course you can do the same dynamically from java code, instead of inline event listeners, used in this example ONLY for simpler demonstration purposes.
I assume you are referring to the ZK tabbox/tab-component and not a browser "tab" or a golden layout "tab" or any other kind of "tab" one can implement. Also please specify what you mean by "on the fly" and also state your ZK version. Ideally provide a zul example illustrating your case.
I was wondering if there is a way to double click the tab and edit it's label. Im working on an application where it's possible to create a form by adding fields ands tabs dinamically, so it would be great if I could change the tab label when performing double clicking.
cahesm ( 2019-07-09 20:09:19 +0800 )editAsked: 2019-07-08 21:12:20 +0800
Seen: 8 times
Last updated: Jul 10 '19
How to Get ViewModel From a Tab class? [closed]
issue creating dynamic tabs via controller #2
issue creating dynamic tabs via controller #1
enhancement needed in scrolling tab in tabbox using javacode
Tabbox with Toolbar: how do I give the Toolbar all available space?
Tabbox and Notifications issue
Issue in Tab close event enhancement