def legend_event(win, plot, figure, frame, lfsize, flegend_box, leg_col_box,
    conf, leg_loc_box, ncol_combo, loaded_plot):
    """
    This function change the propertoes of the legend.
    Parameters:
    -----------
    win             FigureCanvas, obj
    plot            subplot, obj
    figure          Figure, obj
    frame           QCheckBox
    lfsize          QSpinBox
    flegend_combo   QComboBox
    leg_col_combo   QComboBox
    ncol_combo      QComboBox
    loaded_plot     conf
    """
    frame_status = frame.isChecked()
    fontsize = lfsize.value()
    flegend = flegend_box.currentText()
    leg_col = leg_col_box.currentText()
    leg_loc = leg_loc_box.currentText()
    ncol = ncol_combo.currentText()
    if frame_status == True:
        conf['Frame'] = 'on'
    if frame_status == False:
        conf['Frame'] = 'off'
    conf['font_size'] = fontsize
    conf['Label_font_color'] = leg_col
    conf['Legend_font'] = flegend
    conf['location'] = leg_loc
    loaded_plot.plotconf['types']['ncol'] = ncol
    leg = plot.legend(loc=leg_loc, fontsize=fontsize, ncol=int(ncol))
    leg.get_frame().set_facecolor('none')
    leg.set_frame_on(frame_status)
    handles, labels = plot.get_legend_handles_labels()
    if len(handles) > 0:
        for i in leg.get_texts():
            i.set_y(-2)
            i.set_color(leg_col)
            i.set_fontname(flegend)
    else:
        leg.remove()
    figure.tight_layout()
    win.draw()
    return frame_status
