

the following code creates an array of checkboxes, labels and edit boxes in a frame inside a figure. The frame handle is stored in the structure field lsqfrm.fh. Tthe checkboxes are not grouped. If I comment out the code to create the checkbox the rest of the code runs ok. I have tried supplying the frame handle as the first parameter to the uicontrol as well as specifyning it explicitly as the parent as shown. When I use the handle as the first entry I get the error message "uicontrol: Wrong type for input argument #1: String expected". If I use the form shown below the error message is "uicontrol: Wrong type for input argument #1: A 'Figure' or a 'Frame uicontrol' handle expected." I have paused the code before creating the checkbox and checked the validity of the frame handle and its parent figure handle. Anyone have any ideas?
for i=1:size(paramarray,2) //checkbox uicontrol("parent",lsqfrm.fh... ,"Style","checkbutton"... ,"position",[lsqfrm.labx,lsqfrm.guih1,lsqfrm.bw,lsqfrm.bh]... ,"Callback_Type",2... ,"Callback","SelectParam("+string(i)+")"... ,"Max",1,"Min",0,"Value",0,... ,"BackgroundColor",[0.3,0.3,0.3]... ,"ForegroundColor",[1,1,1]... ,"Tag",tagarray(i)+"_chk"... ,"TooltipString","Check to include "+paramarray(i)+" in the LSQ fit"); //checkbox label
Scilab


I can create checkboxes elsewhere in a different part of my code. The only difference here is that the code is in a function and within a for loop in that function. Has me confused. Scilab6.1.1 on Linux Mint 20.


callback
for the checkboxes
. Since you are creating your GUI "programmatically" (that is not with GUIDE
) you can modify your code as follows: change the code for the creation of the axes as followshandles.axes=axes('Units', 'Pixels','tag','axes_tag','Position',[25 25 N-200 M-50]);
that is define the property tag
, you will use it in the checkbox callaback
; the tag
of a uicontrol
might be used with the function findobj
to access to that uicontrol
change the defionition of the checkbox as follows handles.check{ii}=uicontrol('style','checkbox','string', ...
['Display_file_' num2str(ii)],'tag',['c_b_' num2str(ii)], ...
'position',[N-150 M/2-ii*20 100 25],'callback','plot_sel_cb(handles.axes)');
















Designs Digital Download. Earrings SVG Cut Files - Disney SVG - Mickey SVG - Birthday SVG - Valentine SVG - Baby Yoda SVG - Star Wars SVG friends alphabet
Login to add comment






Nice blog right here! after reading, i decide to buy a sleeping bag ASAP Merchant Services Representative
Login to add comment


































I'll recommend a fun game to pass the time. Slope Unblocked is a 3D running game that both kids and adults will enjoy. To get the best score, you should try to run as far as possible. Prepare ahead of time to determine the best course of action in a challenging situation. It's crucial not to collide with any red blocks on the road, as this will immediately end the game.








































































Aquí puedes ver todas las novelas turcas gratis, completas y en español nuevas y terminadas completas con todos los ver novelas online capitulos en español




Finally solved the problem . Seems to be associated with breaking the code out onto separate lines using "..." to indicate a new line. This worked OK for most other controls but not the checkbox. Will check it out further and put a bug report in when I can make it consistent.
11-09-21, 6:55 a.m. DaveC49
It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. The Albany Luxury Residences
14-06-22, 1:17 p.m. hammadamir90
Login to add comment