|
-
Aug 30th, 2005, 02:45 PM
#1
Thread Starter
Member
Dynamic column adjustment needed
Hi guys... there
i have to adjust the extra space of screen width in the name column.
For fixed column in a grid, i used the following calculation.
for i = 0 to grid1.col -1
tot = tot + grid1.colwidth(i) ' finding total columnwidth of the grid.
next i
tot = tot - grid1.colwidth (0)
' Then i am subtracting namecolumn width [SAY name column = Grid1 .COLWIDTH(0)] from the total column width.
grid1.colwidth(0) = grid1.width - tot
' This is the namecolumn[grid1.colwidth(0)] so i have to adjust the extra space only in this column. Gridwidth - totalcolwidth[EXCLUDING COLWIDTH(0)].
but i have a problem in the reverse case [ Grid wih Not fixed column ]
In my VB application , i have grid. Grid column is not fixed it depends upon the user account selection.
If user select 2 account then 4 column is displayed in that grid( Two column is common for all account). if the user select 5 account then 7 column is displayed. Here what i want is within the screenwidth i have to adjust the column automatically. How i can do... If the the total column width is greater than the screen width no problem... If it is less than the screen width it should adjust in the name column.
any can help in this issue....
thanx in advance
yasi
Last edited by smyasin; Aug 30th, 2005 at 03:05 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|