Gridline colours

Post Reply
Doctor Watson
Posts: 2
Joined: Wednesday 22nd August 2018 7:55am

Gridline colours

Post by Doctor Watson » Wednesday 22nd August 2018 9:07am

Hi everyone.

A small introduction : I recently kicked out Windows and changed to Linux Ubuntu. Some 10 years ago I did some programming – amateur, nothing professional – in Real Basic, but I gave up on it when they became Xojo and require you to pay a lot of money if you want to distribute your programme(s). Not something you’re likely to do when you just want to write some freeware.
As I have also a lot of time on my hands, I went looking for a suitable way to take on programming again. So I found Gambas.
My first impression is, that Gambas has a lot in common with Real Basic, so it shouldn’t pose a huge problem to get going (although, after 10 years of inactivity …… )
My first aim is to convert a programme I wrote in Real Basic. It involves a spreadsheet and here is my first question :

The equivalent for building a spreadsheet with Gambas would be TableView or GridView. The problem is, there seems to be no way to set their border colours or cell border colours. They only appear as very faint grey. I would prefer to set them to black. Is this possible?

vuott
Posts: 16
Joined: Wednesday 05th April 2017 6:07pm

Re: Gridline colours

Post by vuott » Wednesday 22nd August 2018 6:16pm

Hello,
if you want to set the color of cells borders (...a unique color for the grid):
Public Sub Form_Open()
 
  With GridView1
    .Columns.Count = 4
    .Rows.Count = 4
   
' We'll obtain a "red" grid:
    .Children[0].Background = Color.Red
  End With

End

Doctor Watson
Posts: 2
Joined: Wednesday 22nd August 2018 7:55am

Re: Gridline colours

Post by Doctor Watson » Thursday 23rd August 2018 6:45am

Thanks Vuott.
That's exactly what I'm looking for.

Post Reply