Ok this is my fault as i've not tested my code ... so i've forgot to little things
This is so the working code : Private aMyValues As New String[] Private aMyStates As New Integer[] Private aMyPicState As New Picture[3] Public Sub _New() aMyPicState[0] = Picture["img/checked.png"] aMyPicState[1] = Picture["img/unchecked.png"] aMyPicState[2] = Picture["img/tristate.png"] 'Load here values and states in arrays aMyValues.Push("First") aMyStates.Push(CheckBox.True) aMyValues.Push("Second") aMyStates.Push(CheckBox.None) aMyValues.Push("Third") aMyStates.Push(CheckBox.False) gridview1.columns.count = 2 gridview1.Columns[0].Width = 22 GridView1.Rows.height = 22 GridView1.Rows.Count = aMyValues.Count End Public Sub GridView1_Data(Row As Integer, Column As Integer) Select Case Column Case 0 Last.Data.Picture = aMyPicState[aMyStates[Row] + 1] Case 1 Last.data.text = aMyValues[Row] End Select End Public Sub GridView1_Click() If Last.Column = 0 Then Inc aMyStates[GridView1.Row] If aMyStates[GridView1.Row] > 1 Then aMySTates[GridView1.Row] = -1 Endif GridView1.Refresh End And I've corrected your project and added a form that show how to use the _draw event. Here it allow to get checkboxes drawed with the current desktop theme.
BrokenCode-0.0.1.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user