[Gambas-user] Just a UI idea

Rolf-Werner Eilert rwe-sse at osnanet.de
Wed Aug 22 16:34:50 CEST 2018


Wanted to share this idea with you.

The other day, I was looking for a horizontal list to be placed above a 
GridView. The list was to contain two-letter briefs of names in the form 
of Xy. The list should show the chosen name, and the user should be able 
to click on a name to choose it.

I could have used a tab-strip, but in this case I found a GridView more 
handy.

- I placed a tiny GridView (above the one to show the data) with only 
one row height

- no scroll gadgets on

- a little array for this GridView contains the list of names

- in the _Data event, it looks for "is this the chosen name/column". If 
yes, the background color is set to a color, if not the color is standard

- in the _Click event, it picks the name and calls the same functions 
like the other elements in the form which choose a name and set it to 
"chosen"

This way I have a variable list, and it looks quite nice.

Regards
Rolf


More information about the User mailing list