Disabling scrollbars(H and V) in redefined xbrowse at runtim
Disabling scrollbars(H and V) in redefined xbrowse at runtim
Dear All,
Do you have any code to solve my problem for the above topic... pls. help... thanks in advance...
regards,
apollo
Do you have any code to solve my problem for the above topic... pls. help... thanks in advance...
regards,
apollo
FWH10.6|BCC5.82|PELLEC|XMATE
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
Try:
oBrw:lHScroll := .f.
oBrw:lVScroll := .f.
Regards,
James
oBrw:lHScroll := .f.
oBrw:lVScroll := .f.
Regards,
James
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
FWH10.6|BCC5.82|PELLEC|XMATE
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
Dear Sir James,
In resource editor,scrollbars in xbrowse (UDC) control are both enabled. Here's code in resource editor:
DLG_PRINTRPT DIALOGEX -2,-16,461,308
FONT 8,"MS Sans Serif",0,0,0
STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION
BEGIN
CONTROL "",1601,"TXBROWSE",WS_CHILDWINDOW|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL,7,6,447,262
And the code in FWH:
Select(0)
REDEFINE XBROWSE oBrwPrintRpt ID 1601 OF oDlgPrintRpt;
ALIAS 'PRINTRPT';
AUTOSORT UPDATE AUTOCOLS LINES CELL;
oBrwPrintRpt:lHScroll := .F.
//oBrwPrintRpt:createFromCode()
Sir James, i received an error when i used "oBrwPrintRpt:createFromCode()" saying "duplicate ID"
thank you very much...
regards,
apollo
In resource editor,scrollbars in xbrowse (UDC) control are both enabled. Here's code in resource editor:
DLG_PRINTRPT DIALOGEX -2,-16,461,308
FONT 8,"MS Sans Serif",0,0,0
STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION
BEGIN
CONTROL "",1601,"TXBROWSE",WS_CHILDWINDOW|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL,7,6,447,262
And the code in FWH:
Select(0)
REDEFINE XBROWSE oBrwPrintRpt ID 1601 OF oDlgPrintRpt;
ALIAS 'PRINTRPT';
AUTOSORT UPDATE AUTOCOLS LINES CELL;
oBrwPrintRpt:lHScroll := .F.
//oBrwPrintRpt:createFromCode()
Sir James, i received an error when i used "oBrwPrintRpt:createFromCode()" saying "duplicate ID"
thank you very much...
regards,
apollo
FWH10.6|BCC5.82|PELLEC|XMATE
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 11 times
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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.
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
You would still disable them but in addition you would hide them so they did not show up at all.
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
FWH10.6|BCC5.82|PELLEC|XMATE
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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....
regards,
apollo
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....

regards,
apollo
FWH10.6|BCC5.82|PELLEC|XMATE
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
Re: Disabling scrollbars(H and V) in redefined xbrowse at runtim
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
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
FWH10.6|BCC5.82|PELLEC|XMATE