1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Italy
    Posts
    4
    Vote Rating
    0
    andypower is on a distinguished road

      0  

    Question How to set font-family style to each comboBox element

    How to set font-family style to each comboBox element


    Hi, I need to realize a comboBox displaying a list of safe browser font-family.
    I would like to display every single element using the corrispondent font-family style.

    Pseudo code:
    ComboBox comboBox = new ComboBox();
    ListStore store = new ListStore(SafeBrowserFontFamily.getElementList);
    int i = 0;
    for(El comboBoxElement : comboBox.getElementList()){
    comboBoxElement.setStyle("font-family", store.getModel(i).getFontFamilyName);
    i++;
    }

    Someone can suggest me the right way?
    Last edited by andypower; 16 Feb 2012 at 9:39 AM. Reason: hindentation

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Location
    Italy
    Posts
    4
    Vote Rating
    0
    andypower is on a distinguished road

      0  

    Default [SOLVED]

    [SOLVED]


    Solved the problem! This is a scratch of my code. I hope that can be usefull to some one else.

    PHP Code:
    this.fontFamilyComboBox.addListener(Events.OnClick, new Listener<BaseEvent>() {

                @
    Override
                
    public void handleEvent(BaseEvent be) {
                    
    ListView<GPFontFamilyValuelistView fontFamilyComboBox.getView();
                    
    int i 0;
                    for (
    Element element listView.getElements()) {
                        
    element.getStyle().setProperty("fontFamily", (String)listStore.getAt(i).get(CssParameterName.FONT_FAMILY.getValue()));
                        
    element.getStyle().setFontSize((fontSizeField.getValue()).intValue(), Style.Unit.PX);
                        
    element.getStyle().setFontWeight((boldToggle.isPressed() ? Style.FontWeight.BOLD Style.FontWeight.NORMAL));
                        
    element.getStyle().setFontStyle((italicToggle.isPressed() ? Style.FontStyle.ITALIC Style.FontStyle.NORMAL));
                        
    i++;
                    }
                }
            }); 

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Location
    London
    Posts
    2
    Vote Rating
    0
    standford is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thanks......Thanks friend......i wa looking for this code from 2 to 3 months..........thanks.....
    Kamagra online|kamagra soft tab|Buy suhagra

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Location
    Italy
    Posts
    4
    Vote Rating
    0
    andypower is on a distinguished road

      0  

    Red face


    Quote Originally Posted by standford View Post
    Thanks......Thanks friend......i wa looking for this code from 2 to 3 months..........thanks.....
    I am happy to know that my code was useful to someone else!

    Enjoy it

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Location
    London
    Posts
    2
    Vote Rating
    0
    standford is on a distinguished road

      0  

    Default Thanks

    Thanks


    Thanks for giving reply........Please keep in touch with me...............

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar