MATLAB Answers

App Designer uitextarea control gives position values not in pixels when window is maximised?

1 ビュー (過去 30 日間)
Bereketab Gulai
Bereketab Gulai 2019 年 11 月 13 日
コメント済み: Bereketab Gulai 2019 年 11 月 14 日
Here is the output. Can this be translated into pixels or any alternatives?
ans =
1.0e+03 *
1.2728 0.7737 0.6092 0.1143

  0 件のコメント

サインイン to comment.

採用された回答

Ajay Kumar
Ajay Kumar 2019 年 11 月 13 日
編集済み: Ajay Kumar 2019 年 11 月 14 日
When I do this:
fig = uifigure;
txa = uitextarea(fig);
txa.position
I get the Output as 100 100 150 60 which are pixels.

  7 件のコメント

表示 4 件の古いコメント
Bereketab Gulai
Bereketab Gulai 2019 年 11 月 14 日
Apparently the: fix()
fix(app.TextArea.Position)
Did the "fix" so it is now shows pixel values correctly. This problem I supppose is related to the where number editField would show numbers in that representation due too long and this can be resolve by changing "ValueDisplayFormat" property to integer.
FYI:
I came to this conclusion after checking the internal value of the control, using mlapptools, which was intact, only at the higher level was being modified.
Ajay Kumar
Ajay Kumar 2019 年 11 月 14 日
I think you are missing out something in c
In the comment above you have considered c as
c = [1.2728 0.7737 0.6092 0.1143]
you are missing to multiply *1.0e+03
which indicates
[1272.8 773.7 609.2 114.3]
which are pixels.
Bereketab Gulai
Bereketab Gulai 2019 年 11 月 14 日
That is correct, they can be restored to correct unit.
Thank you

サインイン to comment.

その他の回答 (0 件)

サインイン してこの質問に回答します。


Translated by