Dear All,
Do you have any code to solve my problem for the above topic... pls. help... thanks in advance...
regards,
apollo
Dear All,
Do you have any code to solve my problem for the above topic... pls. help... thanks in advance...
regards,
apollo
Try:
oBrw:lHScroll := .f.
oBrw:lVScroll := .f.
Regards,
James
Dear Sir james,
Thanks for the prompt reply, i already tried those properties but the scrollbars are still not disabled, my xbrowse is defined using resource of UDC control.
regards,
apollo
Apollo,
Are you also disabling them in the resource editor?
Are you calling oBrw:createFromCode()?
Can we see your code where you define the browse?
James
If you use resource, decide whether you want to have scrollbars when you design your resource itself. If you want to toggle scrollbars on and off at runtime, you better create the dialog by code.
Can they be hidden. I have used resources that overlap each other before. For instance a radio control might need different fields for different choices. So I hide and disable some and unhide and enable the ones I need for the corresponding radio selection.
Apollo,
My mistake. Instead of CreateFromCode() you need to use CreateFromResource( nID ).
You can also try:
oBrw:oHScroll:disable()
oBrw:oVScroll:disable()
I don't think that Gale's idea of hiding the scrollbars will work since the mouse wheel and arrow keys would still provide scrolling.
James
You would still disable them but in addition you would hide them so they did not show up at all.
Gale,
Thanks, that makes sense.
I think that when you use lHScroll, and lVScroll set to false, the scrollbars don't show. At least that is what I remember. I suspect that they are not created.
If you disable them after the control is created, then I am not sure what happens. I don't remember ever trying that.
James
Dear All,
Thanks for ur great ideas. Sir James, i've tried the function disable() but the function was not present neither the oHScroll/oVScroll objects. I still wondered why these objects are not present in xbrowse object...
thanks.
regards,
apollo
Apollo,
It appears the oHVScroll and oVScroll objects are created by the resource editor when you use a resource and by code when you create the browse with code.
Let me ask, are you wanting to disable the scrollbars at runtime before the browse is created or after the browse is created (perhaps on and off while it is active)?
Maybe you could create two browses as resources, one with scrollbars and one without and use the appropriate one at runtime.
Or maybe you could just build the browse with code instead.
Regards,
James
Dear Sir James,
I want to disable scroll bars after the xbrowse is created. The reason why i want to disable the scroll bars what if the number of records loaded in xbrowse is less than the height of Hscroll bar(means records are few or just one record for instance), it is valid to just hide or disable the hscroll bar because there's no need for it.... though, thanks for the ideas.... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
regards,
apollo
Apollo,
Hmm, if I remember correctly a browse will automatically hide or disable (I don't remember which) the scrollbar when it isn't needed (as determined by the number of records). Have you tested this?
Regards,
James
Dear Sir James,
Yes sir, that's the idea. The vertical scroll bar is the one i want to hide or disable when the number of records are few. Also, i tried to revised my code so that the objects of scroll bars (oHScroll and oVScroll) become present but still disabling function and/or property are not working. thanks.
regards,
apollo