StackOverflowMATLABchat / mlapptools

MATLAB class containing methods for programmatic uifigure modification
http://undocumentedmatlab.com/blog/customizing-uifigures-part-2
MIT License
25 stars 11 forks source link

Can't apply styles to uipanel #9

Closed davidn-IA closed 6 years ago

davidn-IA commented 6 years ago

With Windows 10, Matlab 2017b, this fails:

p = uipanel(uifigure());
mlapptools.setStyle(p,'border-radius','10px');

Error as follows (apparently because the widgetID is coming back as null when executing the query string):

Error using matlab.internal.webwindow/executeJS (line 701)
Error executing JavaScript command: 
JavaScript error: Uncaught TypeError: Cannot read property 'style' of null at line 110 column 385 in https://localhost:31515/toolbox/matlab/uitools/uifigureappjs/release/dojo/dojo.js
Error in mlapptools.setStyle (line 245)
              win.executeJS(styleSetStr);
Error in Untitled (line 2)
mlapptools.setStyle(p,'border-radius','10px')

(EDIT by Dev-iL: code formatting.)

Dev-iL commented 6 years ago

This seems to be working now:

untitled

sco1 commented 6 years ago

Should be funcitonal with #8 (947c54e)