Vertical Scroll Bar xBrowse

Vertical Scroll Bar xBrowse

Postby Colin Haig » Mon Jul 23, 2012 8:57 am

Hi All

I use xbrowse in all my apps and dont usually have any problems with scroll bars - but in a function where I use xbrowse as
a pick list the vertical scroll bar is acting weird - I have to mouse over the scroll bar to get it to show correctly - there is no
down button on the bottom of the scroll when the dialog is created - when it does show I cannot move down using the bottom button - but can use
the down arrow to move - the top button on the scroll moves up though. If I click below the scroll cursor it moves down.
I use the same custom resource in my .res file that I use for all my other browses.
Any ideas appreciated.

Regards
Colin
Code: Select all  Expand view

this is how the function is called

nPick := aArrayPick('WIP',aData,{'Job','Client','Invoiced','Not Invoiced','Tag'},{35,155,66,66,25})
//-------------------------------------------------------------------------------------------//
function aArrayPick(cTitle,aShow,aHeaders,aCols)
local oDlg,oBtnArrSelect,oBtnArrCancel,oLbx,lExit := FALSE,nRow := 0

    DEFINE DIALOG oDlg RESOURCE 'aListDlg'  ;
           TITLE cTitle

    REDEFINE XBROWSE oLbx  ID 103 of oDlg   ;
    ARRAY aShow                             ;
    COLSIZES aCols                          ;
    HEADERS aHeaders                        ;
    AUTOCOLS LINES CELL

    oLbx:lVscroll := TRUE
    oLbx:nRowHeight := 25
    oLbx:bKeyChar := {|nKey| if(nKey == VK_RETURN,(nRow := oLbx:nArrayAt,lExit := TRUE,oDlg:end()),) }
   

   REDEFINE BUTTON oBtnArrSelect ID 101 OF oDlg ;
            ACTION(nRow := oLbx:nArrayAt,lExit := TRUE,oDlg:end())

   REDEFINE BUTTON oBtnArrCancel ID 102 OF oDlg ;
            ACTION(nRow := 0,lExit := TRUE,oDlg:end())

   ACTIVATE DIALOG oDlg CENTERED ;
            ON INIT (oLbx:GoTop(),oLbx:SetFocus());
            VALID(lExit)

return(nRow)
 
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: Vertical Scroll Bar xBrowse

Postby nageswaragunupudi » Mon Jul 23, 2012 6:12 pm

1) Please make sure VSCROLL is enabled in the resource.
2) For most picklists the builtin xbrowser function/command comes in handy. The above purpose can be achieved by:

Code: Select all  Expand view

XBROWSER aData TITLE "WIP" ;
   SETUP ( oBrw:cHeaders := {'Job','Client','Invoiced','NotInvoiced','Tag'}, ;
           oBrw:nWidths  := {35,155,66,66,25} ) ;
   SELECT ( nPick := oBrw:KeyNo() )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests