Jump to content

UniMenuButton açılan menünün fontunu nasıl ayarlayabilirim.


pro_imaj

Recommended Posts

Merhaba;

 

1-UniMenuButton fontunu ayarladığımda bu sadece buton için geçerli oluyor halbuki açılan listeninde bu fonta göre açılmasını istiyorum bunu nasıl yapabilirim.

 

2-Bununla birlikte MenuButton tıklandığında listenin açılmasını nasıl sağlarım.

 

Teşekkürler.

Link to comment
Share on other sites

1-UniMenuButton fontunu ayarladığımda bu sadece buton için geçerli oluyor halbuki açılan listeninde bu fonta göre açılmasını istiyorum bunu nasıl yapabilirim.

 

Merhaba,

 

Belki bu metod...:

 

1. UniServerModule -> CustomCSS:

.x-mymenu-item-text .x-menu-item-text {
    color: green;
    font-size: 12px;
    line-height: 24px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold
}

2. UniMenuButton1 -> ClientEvents -> ExtEvents -> function afterrender:

function afterrender(sender, eOpts)
{
    var me=sender;
    var _addCls = function (item) {
        item.forEach(function (_item) {
            _item.addCls('x-mymenu-item-text');
            if (_item.menu) {
                _addCls(_item.menu.items.items)
            }
        })
    };
    
    me.addListener('menushow',     
        Ext.defer(function () {
            if (me.menu) {
                _addCls(me.menu.items.items);
            }
        }, 100)
    );
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...