jQuery UI Widgets › Forums › Layouts › Layout and Docking Layout › jqxDockingLayout Add Icon to Title
Tagged: Add Icon Title, Angular docking layout, docking layout, icon, image, jQuery docking layout, jqxDockingLayout, stop drag drop, title, title click
This topic contains 6 replies, has 3 voices, and was last updated by Dimitar 8 years ago.
-
Author
-
Hello.
I am wondering is there a way to add an image besides the title?
<script type="text/javascript"> $(document).ready(function () { // the 'layout' JSON array defines the internal structure of the docking layout var layout = [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' } ....
Thank you.
Hello jqwidgetsdev,
You can add an image by including an img tag in the title, e.g.:
title: '<img src="../../images/tasksIcon.png" />Document 1',
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thank you, Dimitar.
Your suggestion works well.
Best regards.
Hi,
How can i add click event to the title in jqxDockingLayout. Also can i stop dragging of panels after some operation?
Hi chandrika.sharma,
- Here is an example: https://www.jseditor.io/?key=jqxdockinglayout-title-click-event. Try clicking the title “Document 1”.
- Unfortunately, dragging cannot be disabled at runtime. If you do not need the drag and drop functionality, please use jqxLayout instead.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Dimitar for clicking over title. I want dragging on conditional basis so i cannot go for jqxLayout.
dockingLayout is closer to my requirement that’s why i am using this. Having One more query related to ‘type’ of items array of dockingLayout. Actually my requirement is to create two draggable and resizable panel in one dockingLayout. To achieve this i have used documentGroup type. Refer code:
var layout = [
{
type: ‘layoutGroup’,
orientation:’horizontal’,
items: [
{
type: ‘documentGroup’,
width: ‘100%’,
height: ‘100%’,
items: [{
type: ‘documentPanel’,
title: ‘Pane1’,
contentContainer: ‘Panel1’,
}]
},
{
type: ‘documentGroup’,
width: ‘100%’,
height: ‘100%’,
items: [{
type: ‘documentPanel’,
title: ‘Pane2’,
contentContainer: ‘Panel2’
}]
},
]
}];
This returns me two separate panels which is as per my requirement. But the issue is Panel1 is resizing from right side and Panel2 is resizing from left side, also when i resizes the Panel1, Panel2 also gets resized which is not accepted. There is some error while forming layout variable but i am not able to correct it.
Please let me know how can i set the ‘type’ property so that i can have two panels with resizing from same side without effecting each other.Hi chandrika.sharma,
For your layout to be correct, you would have to set the widths of both document panels to values which summed equal 100%, e.g.:
var layout = [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'documentGroup', width: '50%', height: '100%', items: [{ type: 'documentPanel', title: 'Pane1', contentContainer: 'Panel1', }] }, { type: 'documentGroup', width: '50%', height: '100%', items: [{ type: 'documentPanel', title: 'Pane2', contentContainer: 'Panel2' }] }] }];
Please note, however, that it is not possible for both panels to be independent when they are in the same docking layout. An alternative solution can be using two jqxRibbons inside two jqxWindows.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.