Displaying text in gui edit text.
1 view (last 30 days)
Show older comments
function Feeder_Callback(hObject, eventdata, handles)
% hObject handle to Feeder (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Feeder as text
% str2double(get(hObject,'String')) returns contents of Feeder as a double
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
feeder = 'TEST OUTPUT';
set(handles.Feeder,'String',(feeder));
end
I've got a problem in displaying my text with the variable name feeder (feeder = 'TEST OUTPUT') in the outputgui.fig. Can anyone knows what's the problem with my code. Thanks a lot.
2 Comments
Walter Roberson
on 30 Aug 2019
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
feeder = 'TEST OUTPUT';
set(handles.Feeder, 'String', feeder);
Answers (0)
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!