List view

  • 6 Replies
  • 652 Views
List view
« on: 30 January 2019, 17:23:16 »
Hi Texus. I 've Just download 8.3 version and implemented a listview widget replacing a listbox thinking of make better look.

When you add a column also a vertical border line appearing just to show the different column. However you must add a vertical border only in between two columns and not after it.

When there is one column should not be added this vertical border. If two columns exist the one vertical border should be in the middle of two columns. And so on

vertical borders = columns  > 0 ? columns -1 : 0



*

texus

  • *****
  • 1485
    • View Profile
    • Texus's Blog
Re: List view
« Reply #1 on: 01 February 2019, 08:22:31 »
I added the border behind the last column because this is how a ListView in Windows also works. But I agree that it looks better without the last line, I was also thinking about removing the line when I was making a screenshot of the widget.

I'm not sure how resizing the last column would work then though (in a case where there is a horizontal scrollbar), since normally you drag the line to the right of a column to resize it. Currently that's not really an issue as TGUI doesn't support resizing the columns by dragging the line yet.
Edit: Maybe a compromise could be to only hide the border when there isn't a horizontal scrollbar?
« Last Edit: 01 February 2019, 08:28:38 by texus »

Re: List view
« Reply #2 on: 01 February 2019, 09:50:25 »
Vertical border lines view in windows dot net are optional. They are appearing (if not visible) when a user try to change width of columns.
However the distinguish vertical linew between columns are always visible on header bar even on the right of last bar. The user can change only in header bar the widths of columns.

ideas
a. Vertical lines (not in header) can take a boolean for visibility. (set/getColumnBordersVisible(bool onOff) )
b. Last column vertical right line (not in header) can take a boolean for visibility. (set/getLastColumnBorderVisible(bool onOff) )

Re: List view
« Reply #3 on: 01 February 2019, 16:57:10 »
Check this gridlines variable

*

texus

  • *****
  • 1485
    • View Profile
    • Texus's Blog
Re: List view
« Reply #4 on: 01 February 2019, 18:43:56 »
I'll add VerticalGridLines and HorizontalGridLines properties.
Then the current SeparatorColor in the renderer could be just for the part in the header and a new GridLinesColor could be used for the vertical and horizontal grid lines.

Instead of LastColumnBorderVisible, I could perhaps add a FillColumn option which can be set to the column that should expand to fill the list view. Although then I can't make the last column filled by default as I would already need -1 to disable the option. Maybe I should just stick with FillLastColumn or ExpandLastColumn as this will be most likely be the column that should be expanded.

*

texus

  • *****
  • 1485
    • View Profile
    • Texus's Blog
Re: List view
« Reply #5 on: 14 February 2019, 22:19:14 »
The following changes were just made to the ListView widget:

- Added horizontal grid lines to ListView
- Added option to ListView to expand the last column to fill the remaining space
- Allow a separator between the header and contents in a ListView
- Split separator in ListView into separator and vertical grid line

Re: List view
« Reply #6 on: 15 February 2019, 08:25:14 »
"Now we are talking"
"Awesome"

a big thanks