Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 27
Registered: ‎04-14-2016

add fields in sidepanel

[ Edited ]

I create a new panel in sidebar. How can I add two numberfields in the same line. One near other? What I'm doing wrong?

 

 

$GP.ui.sidebar.add({
xtype: "panel",
layout: "hbox",

title: "new sidebar panel",
items: [

{
xtype : 'numberfield',

name:'stepeni',
fieldLabel: 'Stepeni',
decimalPrecision:10,
id: 'stepeni',


},{
xtype : 'numberfield',

name:'minuti',
fieldLabel: 'Minuti',
decimalPrecision:10,
id: 'minuti',


}


]
});

Highlighted
Staff
Posts: 98
Registered: ‎02-10-2017

Re: add fields in sidepanel

Hi.

 

Sometimes extjs has some tricky stuff, especially in this version.

 

Have you tried layout column?

 

I have something working with this configuration:

 

panel = new Ext.TabPanel({
		activeTab: 0,
		id: 'extendedPanel',
		layoutOnTabChange: true,
		listeners: {
			tabchange: function (panel, tab) {
				tab.setHeight(145);
				tab.doLayout();
			}
		},
		items: [{
				title: 'Tab1',
				items: [{
						border: false,
						xtype: 'fieldset',
						layout: 'column',
						style: 'font: 10px tahoma,arial,helvetica,sans-serif; font-weight: bold;',
						html: 'Some explanation text',
						height: 145,
						items: [{
								border: false,
								xtype: 'fieldset',
								height: 140,
								columnWidth: 0.49,
								items: [{
										border: false,
										columnWidth: 0.9,
										style: 'font:10px tahoma, arial, helvetica, sans-serif; color:#15428b;',
										html: 'Field 1'
									}, {
										border: false,
										columnWidth: 0.9,
										height: 5
									}, {
										border: false,
										columnWidth: 0.9,
										items: [searchField1]
									}
								]
							}, {
								border: false,
								xtype: 'fieldset',
								height: 135,
								columnWidth: 0.49,
								items: [{
										border: false,
										columnWidth: 0.9,
										style: 'font:10px tahoma, arial, helvetica, sans-serif; color:#15428b;',
										html: 'Field 2'
									}, {
										border: false,
										columnWidth: 0.9,
										height: 5
									}, {
										border: false,
										columnWidth: 0.9,
										items: [searchField2]
									}
								]
							}
						]
					}
				]
			}
		]
	})

 

Best regards

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.