Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    ComboBox questa sconosciuta!!

    Stò migrando dalla tecnologia 5.0 a MX e affronto le novità e i problemi dei nuovi componenti.

    ASd esempio, la combobox sarebbe molto utile se sapessi farla funzionare....

    Io la metto sul clip, ci metto anche i valori come label e come data, dò anche l'ordine dei dati e li ho anche caricati via script....

    ma come cavolo funziona l'handler??

    come faccio ad esempio a fare in modo che runtime se io scelgo un certo dato della combo mi parti il caricamento di un clip o un altro????

    please help me
    *****ZUMMO*****

    http://www.z2o.it

  2. #2
    Vai sul dizionario di action script e sulla voce

    myComboBox.setChangeHandler

    trovi come dichiarare la funzione (che poi tu implementerai) che ti permetterà di lanciare i tuoi clip
    Qualcuno mi ha cambiato le impostazioni e io...

  3. #3
    ci sono andato am non è chiaro per niente.....

    avete un esempio semplice????

    io non l'ho trovato....


    *****ZUMMO*****

    http://www.z2o.it

  4. #4
    elencoNote.setChangeHandler("visualizzaDettagli");
    function visualizzaDettagli(component) {
    i = elencoNote.getValue();
    _giorno=giornoNota[i];
    _mese=meseNota[i];
    _anno=annoNota[i];
    _ora=oraNota[i];
    _minuti=minutiNota[i];
    _titolo=titoloNota[i];
    _nota=notaNota[i];
    }

    Questa è una listBox ma dovrebbe essere lo stesso per una ComboBox.

    Praticamente ogni volta che cambio la selezione all'interno di elencoNote mi "popolo" delle variabili di testo che si chiamano _giorno.... utlizzando il valore della voce in elenco selezionata, i praticamente.
    Vedi se riesci a capire così, pensa che dentro a elencoNote c'ho un risultato di una ricerca che avevo fatto dagli array che vedi, tipo titoloNota ecc.

    Scusa per il casino ma sono proprio di fretta.
    Qualcuno mi ha cambiato le impostazioni e io...

  5. #5
    un pò contorto.... + tardi ci provo....
    grazie....

    *****ZUMMO*****

    http://www.z2o.it

  6. #6
    Ancora niente.....
    fino al punto di modificare l'handler con una funzione ci ero arrivato ma come associare diversi mc alle voci della combo????
    *****ZUMMO*****

    http://www.z2o.it

  7. #7
    Ho preso una combobox e l'ho inserito sulla _root inserendo "pippo","paperino" come dati e label.

    Ho dato il nome all istanza "CC"".

    Ho inserito un clip vuoto dove sull azione ha il seguente codice..


    onClipEvent(load) {
    cc.setChangeHandler("visualizzaDettagli");
    alert = "sono qui?"
    function visualizzaDettagli(cc) {
    i = cc.getValue();

    if (i== "pippo")
    {
    getURL("http://www.zummo55.net","_blank");

    }
    }
    }

    La combo appare caricata ma non succede nulla....
    *****ZUMMO*****

    http://www.z2o.it

  8. #8
    Utente di HTML.it L'avatar di Nuke
    Registrato dal
    Feb 2001
    Messaggi
    633
    Non so se ti sia utile, ma tieni conto di questi metodi per le Flistbox e Fcombobox.

    Method
    Description


    addItem( )
    Appends an item to the list of items in the box

    addItemAt( )
    Adds an item at the specified position in the list

    getEnabled( )
    Boolean indicating whether the element is enabled or dimmed ("grayed-out")

    getItemAt( )
    Returns the list item at the specified position

    getLength( )
    Returns the number of items in the list

    getRowCount( )
    Returns the number of rows displayed in a scrolling list

    getScrollPosition( )
    Returns the line number of the top row displayed

    getSelectedIndex( )
    Returns the index of the current list selection

    getSelectedIndices( )
    Returns an array of indexes of, potentially, multiple selections

    getSelectedItem( )
    Returns the selected list item as an object

    getSelectedItems( )
    Returns an array of selected items as objects

    getSelectMultiple( )
    Boolean indicating whether multiple items can be selected in a list box

    getValue( )
    Returns the value of the selected item

    registerSkinElement( )
    Registers a skin element for changing the component appearance

    removeAll( )
    Removes all items from the list

    removeItemAt( )
    Removes a specified item in the list

    replaceItemAt( )
    Replaces the item at the specified position in the list

    setAutoHideScrollBar( )
    Boolean specifying whether to hide the scroll bar when it isn't needed

    setChangeHandler( )
    Specifies the callback function to call when the list's state changes

    setDataProvider( )
    Specifies an array of elements or a DataProvider object to populate the list

    setEditable( )
    Boolean specifying whether the combo box's contents are editable

    setEnabled( )
    Enables or disables (i.e., deactivates) the list box

    setItemSymbol( )
    Specifies the Library symbol ID of a graphics symbol for displaying list content

    setRowCount( )
    Specifies the maximum number of rows displayed in a list

    setScrollPosition( )
    Causes the list box to scroll to the specified item

    setSelectedIndex( )
    Selects an item in the list by its row index (zero-relative)

    setSelectedIndices( )
    Specifies an array of items (by index) to be selected

    setSelectMultiple( )
    Boolean specifying whether multiple items can be selected in a list box

    setSize( )
    Sets the width of the combo box or list box, in pixels (can also set height of a list box)

    setStyleProperty( )
    Sets a particular style property for the combo box or list box (for a list of supported properties, see the FStyleFormat object)

    setValue( )
    Sets the current value for a combo box

    setWidth( )
    Sets the list box width, in pixels

    sortItemsBy( )
    Sorts the items in the list by either their labels or the underlying data

  9. #9
    i metodi li sò.... ma come vedi.. non mi funzionano.....

    non sò neanche se mi entra nella funzione.....
    *****ZUMMO*****

    http://www.z2o.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.