Possible bug with icon columns in ListView
Posted: Thu Jul 04, 2019 12:03 pm
There seems to be a visual bug when I use an icon column if that column is not the first column of the list view.
This is my code:
The icon column is the last column. If you run this code you see that the content of the first column seems to be right aligned, while it should be left aligned like the other columns.
The problem is that the content is not really right aligned but it is moved 60 px to the right which is the width of my brush of the last column! So in this case you don't see that the first column has content until you resize the column. If you decrease the width of the icon brush (let's say to 20) you see the content of the first column but still moved 20 px to the right.
Here are screenshots of the problem:
Tested on Windows 10
This is my code:
Code: Select all
@REQUIRE "RapaGUI"
xml$=[[<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window>
<vgroup>
<listview id="listview1">
<column title="Value 1" />
<column title="Value 2"/>
<column title="Value 3"/>
<column title="Value 4"/>
<column title="Color" icon="True" />
</listview>
</vgroup>
</window>
</application>]]
moai.CreateApp(xml$)
Local brushID = 1
CreateBrush(brushID, 60, 20, #RED)
moai.DoMethod("listview1","insert","bottom", "a", "b", "c", "d", brushID, "e")
Repeat
WaitEvent
Forever
The problem is that the content is not really right aligned but it is moved 60 px to the right which is the width of my brush of the last column! So in this case you don't see that the first column has content until you resize the column. If you decrease the width of the icon brush (let's say to 20) you see the content of the first column but still moved 20 px to the right.
Here are screenshots of the problem:
Tested on Windows 10