Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid: Make vertical scrool bar just when needed?
Message
From
18/03/2010 20:35:30
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
17/03/2010 07:32:12
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01454542
Message ID:
01455644
Views:
129
>>>Hi All,
>>>
>>>Is there any way to make vertical scrool bar visible when just it needed (I mean there should be much record more than visible at first glance of grid)?
>>
>>Hi Metin
>>
>>For some people you have to ask clearly. ;)
>>
>>Not tested. Had to do something like this recently.
>>
>>local lnDataRows, lnDisplayRows
>>store 0 to lnDataRows,lnDisplayrows
>>
>>select count(*) from (this.recordsource) into array laCount
>>if _Tally#0
>> lnDataRows = laCount[1]
>>endif
>>
>>lnDisplayRows = (this.height - iif(inlist(this.scrollbars,1,3),sysmetric(8),0) - this.headerheight) / this.rowheight
>>
>>if lnDataRows > lnDisplayRows
>> if inlist(this.scrollbars,0,1)
>> this.scrollbars = this.scrollbars + 2
>> endif
>>else
>> if inlist(this.scrollbars,3,2)
>> this.scrollbars = this.scrollbars - 2
>> endif
>>endif
>
>Worked perfect without getting any error or bug. thanks... :)

Honestly, I didn't think I'd get it to work off the top of my head like that. ;)
Previous
Reply
Map
View

Click here to load this message in the networking platform