[Gambas-user] Any method to show better the current row in a DataView Grid?
T Lee Davidson
t.lee.davidson at gmail.com
Wed Jan 17 19:15:31 CET 2018
On 01/17/2018 09:40 AM, Rolf-Werner Eilert wrote:
> Am 17.01.2018 11:02, schrieb Constantin Teodorescu:
>> Hello all,
>>
>> I'm evaluating Gambas3 (I have compiled and run 3.10 on a Linux Mint)
>> and I check various things!
>>
>> Is there any hidden property that will show the current row in a
>> DataView Grid, more than the bold row number in the left header?
>>
>> I have done something ugly to that, is there any othe more elegant
>> method to achieve the same thing? :-)
>>
>> Public Sub PersDV_Activate()
>> Dim numRow As Integer
>> Dim oldText As String
>> numRow = PersDV.View.Row
>> If numRow > -1 Then
>> oldText = PersDV.View[numRow, 0].Text
>> PersDV.View[numRow, 0].Background = Color.blue
>> PersDV.View[numRow, 0].Foreground = Color.white
>> PersDV.View[numRow, 0].Text = oldText
>> PersDV.View[numRow, 0].Refresh
>> Endif
>> End
>>
>> Thanks,
>> Teo
>>
>>
>
> There should be a property "single" or "row" for the way something can be marked by the user by clicking on one row. Set this to
> True and then make the last line the current line or set its "marked" property to True.
>
> I do not have the time to check for it right now, so my answer is a bit fuzzy, but this is how you might achieve it. Just from
> memory...
>
> Regards
> Rolf
>
I think Rolf is referring to 'Mode'. It can be None, Single, or Multiple.
Setting it to Single will accomplish what you seek.
--
Lee
More information about the User
mailing list