View Single Post
  #11 (permalink)  
Old 02-25-2008, 02:02 AM
yildi yildi is offline
Knows the basics
 
Join Date: May 2007
Posts: 64
Awards Showcase
Beta Tester 
Total Awards: 1
Default

In the waiting, my problem comes from the fact that the Width property of a table gives the external width of the control but not the internal net width in which one can place the columns. This is perfectly normal of course. But I have a problem when I try to programmatically fix the the width of the columns of my table, like

Code:
colWidth = Round((Table1.Width)/Table1.ColCount)
For i = 0 To Table1.ColCount-1
	Table1.ColWidth (Table1.ColName(i)) = colWidth
Next
Indeed, when a vertical scroll bar appears, it eats the internal space of the Table and given that the columns' total width is equal to to table width, I also get a horizontal scroll bar. I ignore the exact thickness of these bars but I change the preceding code by

colWidth = Round((Table1.Width-rightMargin)/Table1.ColCount)

and adjust rightMargin by trial and error. But this is not a very elegant solution, since if I do not have a scroll bar, this leaves a small empty border on the left of the table, where the scroll bar is supposed to appear if necessary.

Am I stupid or is this a real aesthetic problem?

I hope that this is better understandable.

Regards,

Murat
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote