bugGNU Octave - Bugs: bug #67638, uitable 'backgroundcolor' property...

 
 

bug #67638: uitable 'backgroundcolor' property accepts only two colors

Submitter:  Liang Tang <lt1234>
Submitted:  Mon 27 Oct 2025 10:08:29 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  4 Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Open
Release:  * 10.3.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Tue 28 Oct 2025 09:58:14 AM UTC, comment #1: 

Confirmed.

The relevant code is in libgui/graphics/Table.cc (Table::updatePalette).  The current implementation relies on Qt setPalette which only supports two colors.  There is already a FIXME note in the code about adding support for color specifications with more than two rows.  Unfortunately, the current implementation relies on Qt setPalette() function which only supports two colors (base and alternate).  Adding support for more colors will mean changing the design of coloring tables completely.

Rik <rik5>
Group administrator
Mon 27 Oct 2025 10:08:29 PM UTC, original submission:  

Background color of uitable properties can be used to effectively highlight the data to focus on.  Octave allows only 2x3 color spec. 

% In matlab the background color of the third row for this example is red.

fid=figure; uitable(fid, 'data', {1 2 3 }', 'backgroundcolor', [1 1 1;0.9 0.9 1; 1 0 0])

% in matlab, the background color of the third row is red and the fourth row is green for this example.
fid=figure; uitable(fid, 'data', {1 2 3 4}', 'backgroundcolor', [1 1 1;0.9 0.9 1; 1 0 0; 0 1 0])

% In matlab, the 3x3 backgroundcolor spec of this example repeats.

fid=figure; uitable(fid, 'data', {1 2 3 4 5 6 7}', 'backgroundcolor', [1 1 1;0.9 0.9 1; 1 0 0])

Liang Tang <lt1234>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lt1234 (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    History

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-10-28 rik5 Summaryuitable 'backgroundcolor' accepts only the 2x3 color spec. uitable 'backgroundcolor' property accepts only two colors
    2025-10-28 rik5 StatusNone Confirmed
        Operating SystemMicrosoft Windows Any
    2025-10-28 rik5 Severity3 - Normal 1 - Wish
        Priority5 - Normal 4

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code