MATLAB Answers

1

uipanel does not appear in GUI

I can not get the uipanel to appear in my GUI. My code is:

function [] = Hoover_For_Loops1
    S.fh = figure('units','pixels',...    
              'position',[400 200 600 400],...
              'menubar','none',...
              'name','For Loop Matrix Generator',...
              'resize','off',...
              'numbertitle','off');
    S.Pa1 = uipanel('Title','Input Values #1',...
              'FontSize','12',...
              'BackgroundColor','white',...
              'Units','characters',...
              'Position',[1/20 1/20 119.9 8],...
              'Parent',S.fh);

May you please see what is wrong with the code? Thanks in advance.

  1 Comment

Please use meaningful tags: Nearly All questions in this forum concern "matlab code".

Do you get an error message?

Log in to comment.

Tags

2 Answers

Answer by Akiva Gordon on 15 Nov 2012
 Accepted Answer

The value for the FontSize property must be numeric, not a character string. Remove the single quotes around the 12, and that should do the trick.

  0 Comments

Log in to comment.


Answer by Lawson Hoover on 15 Nov 2012

That was the problem, thank you!

  0 Comments

Log in to comment.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Win prizes and improve your MATLAB skills

Play today