MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Dokumentacja Strona 192

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 216
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 191
5 GUI Applications
5-26
end
set(handles.ResultsList,'String',ResultsStr);
% Store the new ResultsData
handles.ResultsData = ResultsData;
guidata(hObject, handles)
Removing Results from the List Box
The GUI Remove button callback deletes any selected item from the
Results list list box. It also deletes the corresponding run data from the
handles structure. When a user clicks on the Remove button, the callback
executes the following steps:
• Determines which list box items are selected when a user clicks on the
Remove button and removes these items from the list box String property
by setting each item to the empty matrix
[].
• Removes the deleted data from the
handles structure.
• Displays the string
<empty> and disables the Remove and Plot buttons
(using the
Enable property), if all the items in the list box are removed.
• Save the changes to the
handles structure (guidata).
Here is the
Remove button callback.
function RemoveButton_Callback(hObject, eventdata, handles)
currentVal = get(handles.ResultsList,'Value');
resultsStr = get(handles.ResultsList,'String');
numResults = size(resultsStr,1);
% Remove the data and list entry for the selected value
resultsStr(currentVal) =[];
handles.ResultsData(currentVal)=[];
% If there are no other entries, disable the Remove and Plot button
% and change the list sting to <empty>
if isequal(numResults,length(currentVal)),
resultsStr = {'<empty>'};
currentVal = 1;
set([handles.RemoveButton,handles.PlotButton],'Enable','off')
end
% Ensure that list box Value is valid, then reset Value and String
currentVal = min(currentVal,size(resultsStr,1));
Przeglądanie stron 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 215 216

Komentarze do niniejszej Instrukcji

Brak uwag

LiquiFix Unknown user manuals

The list of LiquiFix Unknown products contains 2 user manuals for 2 models. All pdf user’s guides are available for download or viewing online.

Click on an alphabet below to scroll to the full list of models starting with that letter

Models Document Type
400104
Installation Guide   LiquiFix 400104 Installation Guide, 1 pages
400185
Instruction Manual   LiquiFix 400185 Instructions / Assembly, 1 pages