Removing table headers forces a scrollbar
Posted
#1
(In Topic #919)
Regular

Code
tTableHere is the definition :
Code (gambas)
- tTable.Columns.Count = 3
- tTable.Columns[0].Title = "SAMPLE"
- tTable.Columns[1].Text = "ID"
- tTable.Columns[2].Text = "DATA"
- tTable.Width = 200 'parentTable.Current.Width + 10
- tTable.Height = 80 'parentTable.Current.Height - tTable.Top - 5 - 10
Now, later on we do this :
This sets the eight to 49. I checked.
Even below that we set :
Code (gambas)
Even now, the height is 49, I checked. There is only one row, with row Height = 21. We turn off the headers with
Code (gambas)
Now finally we do :
Code (gambas)
- sumVals = sumVals + tTable.Rows[cnt].Height
- Print cnt, sumVals
- tTable.Height = sumVals + 2 'alternatively : tTable.Height - tTable.Columns.Height
- 'tTable.Resize(tTable.Width, sumVals+2) '<--- alternatively I am using this
The table had one row, and it had a height of 21. So this should make the table height = 21 + 2.
Indeed I can print that the table height is now 23, but it is adding a few scrollbars! It seems, within the borders, the scrollbar still allows for a total height of 49. So something is making the 49 a persistent height. Even if the outer borders, and printed message agree, that I have tables of height 23 - it seems that inside the table, despite a single row, and turning off the headers via the none option, something of height 49 is still there.
What is wrong? Thank you.
Posted
Guru

Posted
Regular

Thank you anyway
1 guest and 0 members have just viewed this.


