필터 지우기
필터 지우기

Get UITable Physical Column Width

조회 수: 16 (최근 30일)
Derek
Derek 2024년 4월 29일
댓글: Derek 2024년 4월 29일
Hello Matlab Community,
I'm working on developing a custom ui component using app designer. The custom component is a uitable with filters. The table is made out of two uitable components, one stacked on top of the other. The lower uitable houses all of my data while the top uitable provides the headers for the entire table as well as the filtering options.
The problem I'm running into is that the column widths do not match up. If I set the column widths to "auto", the tables end up being misaligned relative to one another. I'm trying to see if there is a way to get the physical width of each column and set it programmatically for cases in which an app window size is changed or when a user manually adjusts a column. The end result should be that both uitables have the same array of column widths. See attached image for example.

답변 (1개)

ScottB
ScottB 2024년 4월 29일
w = uitable
set(w,"ColumnWidth",{10})
g = get(w,'ColumnWidth')
  댓글 수: 1
Derek
Derek 2024년 4월 29일
I'm looking for a way to determine the physical column widths if matlab autogenerates the column widths. Alternatively, a way to calculate the needed column widths for max length of data within each column would be helpful. I'm not quite sure how to go about that task though.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by