Has nobody an advice for me? :-)
I know that my problem is;
this.getRoot() in the function "bigfont"
But I do not understand in the moment why this cause a problem.
If I add
var doc = this.getRoot(); in the "main" function it is no problem.
thanks a lot for any help.
regards
Hansjoerg
Qoodary wrote:
>
> Hi all,
> I want to add an option for users to change the font size by hand.
> I add this menu:
> getFontSizeMenu : function()
> {
> var menu = new qx.ui.menu.Menu;
> var BiggerButton = new qx.ui.menu.Button(this.tr("Bigger ++"));
> var SmallerButton = new qx.ui.menu.Button(this.tr("Smaller --"));
>
> BiggerButton.addListener("execute", this.bigfont);
> SmallerButton.addListener("execute", this.smallfont);
>
> menu.add(BiggerButton);
> menu.add(SmallerButton);
> return menu;
> },
>
> Functions:
> ---------------------------------
> bigfont : function() {
> var doc = this.getRoot();
> doc.setFont(new qx.bom.Font(20));
> }
> smallfont : function() {
> var doc = this.getRoot();
> doc.setFont(new qx.bom.Font(10));
> }
>
> I dont know if this is the correct way. If you click in the menu at
> "Bigger" I receive the error message
> this.getRoot is not a function
> [Break on this error] var doc = this.getRoot();
>
> What is wrong?
> How can you change the font in steps like +2 . -2 ?
>
> regards
> Hansjoerg
>
--
View this message in context:
http://old.nabble.com/Decrease%2C-increase-Font-size--tp29738521p29746561.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel