Create a custom Jx.Button

30 views
Skip to first unread message

e-tip

unread,
Dec 3, 2012, 8:42:44 AM12/3/12
to jx...@googlegroups.com
Hi everybody.
I'm developing a custom Jx.Button object that i've callled Jx.MyButton.
i've developed a new button because i have to change the graphics of the button in the menu by moving down the arrow indicator and do some other customization that i've not been able to with the standard button. ( i've added an attachment of what i want to obtain the circled one is the menu button ( that is 100% of toolbar height ) the second piece is what happens when the button is clicked.
To obtain this i've created a new Jx.Button that extends Jx.Widget, and to use a custom class i've modified options.classes.domObj to be jxButtonFullContainer and modified the template of my button 

template: '<span class="jxButtonFullContainer"><a class="jxButton"><span class="jxButtonContent"><img class="jxButtonIcon" src="'+Jx.aPixel.src+'"><span class="jxButtonLabel"></span></span></a></span>'

but only doing this i get an error 
Uncaught TypeError: Cannot call method 'removeClass' of null  
because in this way domObj is not defined.. is there a way i can modify the Button container class ? 

Thanks
example.png

e-tip

unread,
Dec 3, 2012, 9:06:53 AM12/3/12
to jx...@googlegroups.com
Solved, 
didn't realized that Jx.Menu ( which i've also extended passes a template to the button ) 


Reply all
Reply to author
Forward
0 new messages