Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Changing cell color in uitable

Subject: Changing cell color in uitable

From: Hans Gohle

Date: 28 May, 2009 15:30:18

Message: 1 of 2

Hi all,

I tried the following CellRenderer provided by Yair Altman:

[1] http://www.mathworks.de/matlabcentral/newsreader/view_thread/150507

It provides a function to change the background color of one specific cell. Unfortunately, this is not exactly what I'm in need of. I use a uitable object and place checkboxes in each column. What I would need is a CellRenderer that marks the background of the checkbox element if I execute a function. So basically it should have the same functionality as in [1] but it should also work with checkbox elements. Can anybody help me with that?

Thanks,
g.

Subject: Changing cell color in uitable

From: Yair Altman

Date: 30 May, 2009 21:18:01

Message: 2 of 2

"Hans Gohle" <ghostryder@gmx.de> wrote in message <gvmama$fte$1@fred.mathworks.com>...
> Hi all,
>
> I tried the following CellRenderer provided by Yair Altman:
>
> [1] http://www.mathworks.de/matlabcentral/newsreader/view_thread/150507
>
> It provides a function to change the background color of one specific cell. Unfortunately, this is not exactly what I'm in need of. I use a uitable object and place checkboxes in each column. What I would need is a CellRenderer that marks the background of the checkbox element if I execute a function. So basically it should have the same functionality as in [1] but it should also work with checkbox elements. Can anybody help me with that?
>
> Thanks,
> g.

Checkboxes have their own renderers, and in general use the system controls or standard PLAF (Look-&-Feel) UI. If this is Chinese to you then it basically means "no it can't be done" - otherwise go right ahead and modify the PLAF UI or write your own Java checkbox class... Some good pointers here: http://forums.sun.com/thread.jspa?forumID=57&threadID=623605

Yair Altman
http://UndocumentedMatlab.com
 

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us