EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2025, 11:19:49 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Panel tool button with text
Pages: [
1
]
« previous
next »
Print
Author
Topic: Panel tool button with text (Read 12828 times)
Fabrice
Jr. Member
Posts: 62
Panel tool button with text
«
on:
September 28, 2015, 07:40:27 AM »
How can i add text to panel tool button ?
I try this but does not work :
Code:
tools: [{
iconCls: 'icon-add',
text: 'Add',
handler: function () {
alert('add');
}
}, {
iconCls: 'icon-remove',
text: 'Remove',
handler: function () { alert('remove') }
}]
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Panel tool button with text
«
Reply #1 on:
September 29, 2015, 12:43:49 AM »
You can not use the 'tools' property to add a text button, but you can custom the whole panel header.
Code:
<div id="p" class="easyui-panel" title="Basic Panel" style="width:430px;height:200px;">
<header>
<span style="display:inline-block;line-height:20px">title</span>
<span style="float:right;">
<a href="#" class="easyui-linkbutton" style="height:20px">textbutton</a>
</span>
</header>
</div>
Logged
iLLuSia
Newbie
Posts: 12
Re: Panel tool button with text
«
Reply #2 on:
March 15, 2021, 06:31:29 PM »
Hello,
I used this code to add buttons on the title on a dialog, it works fine. But there's a little problem: I can no longer drag&drop the dialog. Is there a way to fix this?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Panel tool button with text
«
Reply #3 on:
March 15, 2021, 11:39:01 PM »
Please refer to the code below.
Code:
<div id="dlg" class="easyui-dialog" title="Basic Dialog" data-options="iconCls:'icon-save'" style="width:400px;height:200px;padding:10px">
<header class="f-row">
<div class="panel-title f-full">
<span style="display:inline-block;line-height:20px">title</span>
</div>
<a href="#" class="easyui-linkbutton" style="height:20px">textbutton</a>
</span>
</header>
<div>The dialog content.</div>
</div>
Code:
$(function(){
$('#dlg').data('window').window.draggable({
handle: '>.panel-header>.panel-title'
})
})
Logged
iLLuSia
Newbie
Posts: 12
Re: Panel tool button with text
«
Reply #4 on:
March 17, 2021, 01:40:41 AM »
I'll be testing the code in the near future. Thank you very much!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...