Thread Subject: Popup Menu resetting startup properties

Subject: Popup Menu resetting startup properties

From: Michael

Date: 9 Sep, 2009 15:39:19

Message: 1 of 1

I have the following code (below) attached to a checkbox and it works. However, My question is as follows:

Is there a better way to reset the vaules of the popupmenu to the default values on startup?


------Code----------------------
function checkbox2_Callback(hObject, eventdata, handles)
status=get(hObject,'Value');
if status==1
    set(handles.popupmenu3,'enable','on');
    set(handles.popupmenu3,'String', handles.titles_string);
    set(handles.checkbox3,'enable','on');
else
    set(handles.checkbox2,'value',0);
    set(handles.popupmenu3,'enable','off');
    set(handles.popupmenu3,'Value',1);
    set(handles.popupmenu3,'String', 'Not Active');
    set(handles.checkbox3,'enable','off');
    set(handles.checkbox3,'value',0);
    set(handles.popupmenu4,'enable','off');
    set(handles.popupmenu4,'Value',1);
    set(handles.popupmenu4,'String', 'Not Active');
    temp=get(handles.radiobutton4,'value');
    if temp==1
        set(handles.radiobutton2,'value',1)
        handles.RadioButtonState=0;
    end
end
guidata(hObject, handles);

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
popup menu Michael 9 Sep, 2009 11:39:30
rssFeed for this Thread

Contact us at files@mathworks.com