PDA

View Full Version : Weird behavior on inserting checkbox (or radiobutton) in header



KingWarin
2 Jul 2012, 3:17 AM
Hey,

working on a project I would like to insert a checkbox / a radiobutton group into the header of a panel.
Using a code like this:


xtype:'panel',layout:'anchor',
border:false,
bodyPadding:5,
title:'%Subject%',
header:{
padding:'2 0 5 0',
items:
[{
xtype:'hwBaseStaticCheckbox',
height:18,
msgTarget:'side',
name:'admainperson',
fieldLabel:'',
singleMode:true,
isKeyword:false,
isFormField:true,
columns:1,
vertical:false,
setData:[{'alias':'1','name':'Hauptansprechpartner'}]
}]
},
flex:1,
autoScroll:true,
items: ....

gets me a result like this:

36708

the title is displayed on the right of the checkbox instead on its left.
Changing the "titleAlign" makes no difference (well if it's set to "right" the title is displayed far right...) and setting the headers xtype with "xtype:'header' " doesnt make a difference either.

Every item which is inserted into the header is displayed left of the title, pushing it to the right.
Worst case scenario at the moment is inserting three radiobuttons, which you can guess results in a title almost glued to the right border.

Is there anyone who ran into a similiar problem or at least knows a possible solution? Or an easy way to get the title back to the left where it should be?
I've already thought of inserting a simple label and use stylesheets to make it look like a title, but to be honest I would prefer to have a clean solution...

so long
Sven

friend
2 Jul 2012, 4:13 AM
The fieldLabel attribute normally displays to the left of a checkbox while the boxLabel attribute displays to the right of the checkbox.

Try specifying a value for fieldLabel.

KingWarin
2 Jul 2012, 7:09 AM
The fieldLabel attribute normally displays to the left of a checkbox while the boxLabel attribute displays to the right of the checkbox.

Try specifying a value for fieldLabel.

Thank you friend, works so far, but needs the styling like using a label.
Due to the checkbox is not always shown switching between displaying the title and displaying the checkbox is necessary, but for now this will work.

Maybe there's another solution where the real title can be used...