Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How to create a GridCtrl with fixed cell size
Re: How to create a GridCtrl with fixed cell size [message #15984 is a reply to message #15983] |
Wed, 21 May 2008 17:45   |
|
Quote: |
GetCursorPos worked. I just had to change event from WhenCursor to WhenChangeRow & WhenChangeCol. With WhenCursor it was always (-1,-1), even though this event triggered on cell change.
|
Starange, you should get correct values in WhenCursor. I'll try to check it.
Quote: |
Like in most other cases, I need to insert some data in the container widget, but I need it to display some text. From what I could tell from the interface of GridCtrl, is that you insert some arbitrary type converted to a Value, and write a custom Display to display a string while the control holds you values.
|
Ok, now I understand. One cell holds one Value object. If you want key/value pair conected with one cell you have to use some structure as Value. As for displaying. You have to extend GridDisplay class which contain some useful methods like SetLeft/Right/CenterImage.
You could also do somehting like this:
grd.AddIndex(); this column will hold keys (and it will be invisible)
grd.AddColumn(); this column will hold values
grd.AddIndex()
grd.AddColumn
In GridDisplay you can access via parent member neighbours' values. You can also read current position via col, row members.
Hope that will help you somehow
[Updated on: Wed, 21 May 2008 17:45] Report message to a moderator
|
|
|
 |
|
How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Mon, 19 May 2008 12:23
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Mon, 19 May 2008 12:48
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Mon, 19 May 2008 17:25
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Mon, 19 May 2008 19:56
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Mon, 19 May 2008 18:09
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Tue, 20 May 2008 08:19
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Tue, 20 May 2008 09:07
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Tue, 20 May 2008 10:49
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Tue, 20 May 2008 11:13
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Tue, 20 May 2008 14:28
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Tue, 20 May 2008 15:33
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Tue, 20 May 2008 17:43
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Wed, 21 May 2008 15:58
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Wed, 21 May 2008 17:45
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Thu, 22 May 2008 12:10
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Thu, 22 May 2008 18:38
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: mrjt on Fri, 23 May 2008 11:14
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Sat, 24 May 2008 19:32
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Mon, 09 June 2008 10:08
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Mon, 19 May 2008 17:23
|
 |
|
Re: How to create a GridCtrl with fixed cell size
By: unodgs on Mon, 19 May 2008 12:34
|
Goto Forum:
Current Time: Tue Apr 29 19:56:44 CEST 2025
Total time taken to generate the page: 0.01162 seconds
|