Vertical scroll wbrowse on folders

Post Reply
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Vertical scroll wbrowse on folders

Post by Rick Lipkin »

To All

I have 4 folders on a form that have embeded dialogs and PARTS is one of them and all have defined WS_VSCROLL :

Code: Select all | Expand


PARTS DIALOG 13, 18, 347, 128
STYLE WS_CHILD | 0x4
{
 CONTROL "", 111, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 48, 3, 292, 114
 PUSHBUTTON "&Add Parts", 114, 3, 9, 39, 14
 PUSHBUTTON "&Edit Parts", 115, 3, 25, 39, 14
 PUSHBUTTON "&Del Parts", 116, 3, 41, 39, 14
}
 


Code: Select all | Expand


WORKORD DIALOG 22, 9, 407, 277
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_THICKFRAME
FONT 8, "MS Sans Serif"
{
 EDITTEXT 125, 6, 18, 29, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 120, 38, 18, 36, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 117, 79, 18, 49, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 118, 132, 18, 51, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 119, 204, 18, 27, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 121, 235, 18, 42, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 132, 281, 18, 49, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 122, 235, 41, 95, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 131, 235, 55, 48, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 145, 235, 81, 48, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 135, 235, 95, 48, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 123, 79, 41, 49, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 126, 132, 41, 28, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 129, 79, 55, 49, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 130, 132, 55, 28, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 124, 79, 68, 81, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 133, 79, 81, 81, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 134, 34, 95, 126, 12, WS_BORDER | WS_TABSTOP
 LTEXT "Serial#", -1, 177, 41, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 EDITTEXT 128, 349, 18, 45, 12, WS_BORDER | WS_TABSTOP
 CONTROL "", 110, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 118, 386, 122
 PUSHBUTTON "&Quit", 112, 356, 33, 40, 22
 PUSHBUTTON "&Print", 127, 356, 70, 40, 13
 EDITTEXT 140, 63, 248, 38, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 141, 135, 248, 36, 12, WS_BORDER | WS_TABSTOP
 LTEXT "Total", -1, 325, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 EDITTEXT 142, 354, 248, 43, 12, WS_BORDER | WS_TABSTOP
 PUSHBUTTON "C&lose WO", 143, 356, 83, 40, 13
 PUSHBUTTON "&Reopen", 144, 356, 96, 40, 13
 PUSHBUTTON "&Void WO", 146, 312, 96, 40, 13
 EDITTEXT 147, 207, 248, 37, 12, WS_BORDER | WS_TABSTOP
 EDITTEXT 150, 280, 248, 38, 12, WS_BORDER | WS_TABSTOP
 PUSHBUTTON "&Memo", 151, 312, 83, 40, 13
 EDITTEXT 152, 235, 68, 48, 12, WS_BORDER | WS_TABSTOP
 LTEXT "Odometer IN", -1, 177, 55, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Odometer OUT", -1, 177, 68, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Program Area", -1, 177, 81, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Technician", -1, 177, 95, 53, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Date / Time IN", -1, 7, 41, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Date / Time OUT", -1, 7, 55, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Contact Person", -1, 7, 68, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Contact Phone", -1, 7, 81, 66, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Re:", -1, 7, 95, 22, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Shop ID", -1, 6, 4, 29, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "License       Make                Model                        Year         Vnumb            EqpTp  ", -1, 39, 4, 291, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Parts Total", -1, 7, 248, 49, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Tires", -1, 251, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Outside", -1, 178, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 LTEXT "Labor", -1, 106, 248, 27, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 PUSHBUTTON "&Edit WO", 153, 356, 57, 40, 13
 LTEXT "Work Order", -1, 349, 4, 45, 12, SS_NOPREFIX | WS_BORDER | WS_GROUP
 


You will notice I have the folder defined

Code: Select all | Expand


CONTROL "", 110, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 118, 386, 122
 


Just noticed that the verticle scroll bar does not appear in the folder dialogs and it is impossible to scroll down the listbox.

What am I doing wrong ??

Thanks
Rick Lipkin
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: Vertical scroll wbrowse on folders

Post by Colin Haig »

Hi Rick

This is how the browse is defined on dialogs on folders

CONTROL "", 202, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 0, 4, 580, 228

This is how I use it in code

oLbx := TWBrowse():ReDefine(PoAddBrw,{||eval(bData)},;
oDlg,aHead,aSizes,,,,,{||eval(bClick)},,,,,CBRWPOCOLOR)

oPoitms:SetBrowse(oLbx)
oLbx:nClrForeFocus := CBRWFORE
oLbx:nClrBackFocus := CBRWBACK
oLbx:nClrBackHead := CHEADBACK
oLbx:nClrForehead := CHEADFRONT
oLbx:aJustify := eval(bAdjust)
oLbx:nLineStyle := 1
oLbx:nLineHeight := 22
oLbx:nFreeze := 11
oLbx:lCellStyle = TRUE
oLbx:lAutoEdit = TRUE

Regards

Colin
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Vertical scroll wbrowse on folders

Post by Rick Lipkin »

Colen

I changed the .rc to take out the leading 0 parameter with no difference, still with no vertical scroll bar .. here is my folder code :

Code: Select all | Expand


PARTS DIALOG 13, 18, 347, 128
STYLE WS_CHILD | 0x4
{
 CONTROL "", 111, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 48, 3, 292, 114
 PUSHBUTTON "&Add Parts", 114, 3, 9, 39, 14
 PUSHBUTTON "&Edit Parts", 115, 3, 25, 39, 14
 PUSHBUTTON "&Del Parts", 116, 3, 41, 39, 14
}
 



Code: Select all | Expand


DEFINE DIALOG oWORK RESOURCE "WORKORD" ;
       COLOR rgb(192,192,192), rgb(45,121,147) ;
       TITLE xTITLE+cDISP

//------ set up all folders

    REDEFINE FOLDER oFLD1 ID 110 of oWORK ;
         PROMPT "&Parts", "&Labor", "&Tires", "&Outside" ;
         DIALOGS "PARTS", "LABOR", "TIRES", "OUTSIDE"

//----- parts folder

    REDEFINE LISTBOX oLBX FIELDS    ;
    if(oRsItem:eof, ,str(oRsItem:Fields("QTY"):Value,3)),;
    if(oRsItem:eof, ,oRsItem:Fields("ITYPE"):Value),     ;
    if(oRsItem:eof, ,oRsItem:Fields("PREFIX"):Value+"-"+oRsItem:Fields("STOCKNO"):Value),;
    if(oRsItem:eof, ,oRsItem:Fields("DESCRIP"):Value),   ;
    if(oRsItem:eof, ,STR(oRsItem:Fields("PRICE1"):Value,8,2)),;
    if(oRsItem:eof, ,STR(oRsItem:Fields("EXTEND"):Value,8,2));
    HEADERS "Qty",              ;
            "Tp",               ;
            "StockNo",          ;
            "Description",      ;
            "Price",            ;
            "Extend"            ;
    SIZES 25,25,105,170,75,75   ;
    ID 111 of oFld1:aDialogs[1] ;
    ON DBLCLICK ( _itemview("V", oRsItem, oRsWork,oRsInv, oRsSinv, oRsTinv ),;
    oPARTS:ReFresh(), oTOTAL:ReFresh(),;
    oLBX:ReFresh(),;
    oLBX:SetFocus(), SysReFresh() ) ;
    UPDATE

    IF .not. oRsItem:eof
       oLbx:bLogicLen := { || oRsItem:RecordCount }
       oLbx:bGoTop    := { || oRsItem:MoveFirst() }
       oLbx:bGoBottom := { || oRsItem:MoveLast() }
       oLbx:bSkip     := { | nSkip | Skipper( oRsItem, nSkip ) }
       oLbx:cAlias    := "ARRAY"
    ENDIF
 
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Vertical scroll wbrowse on folders

Post by James Bott »

Rick,

According to my notes, if bLogicLen is returning zero then the scrollbar won't show. Also, oVscroll must not be nil. So, you might add a couple of msgInfo()'s to check these at runtime.

If that doesn't shed any light, then I would try making the listbox redefine as simple as possible.

I assume you have enough data to more than fill the browse?

James
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: Vertical scroll wbrowse on folders

Post by Colin Haig »

Rick

I am wondering why oLBX:cAlias := 'ARRAY' if you are working on a table.

Colin
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Vertical scroll wbrowse on folders

Post by Rick Lipkin »

James

I have to test for oRs:eof before I paint any rows in a listbox or I get a run-time ..

Code: Select all | Expand


IF .not. oRsItem:eof
       oLbx:bLogicLen := { || oRsItem:RecordCount }
       oLbx:bGoTop    := { || oRsItem:MoveFirst() }
       oLbx:bGoBottom := { || oRsItem:MoveLast() }
       oLbx:bSkip     := { | nSkip | Skipper( oRsItem, nSkip ) }
       oLbx:cAlias    := "ARRAY"
    ENDIF

 


I am sure this has something to do with it .. I just need another pair of eyes to shed some light on this ..

Rick
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Vertical scroll wbrowse on folders

Post by Rick Lipkin »

To All

I have now also tried xBrowse with similar results .. I get the left side arrow but no vertical scroll bar and when I arrow down .. there is no bottom to the listbox ..

Code: Select all | Expand


DEFINE DIALOG oWORK RESOURCE "WORKORD" ;
       COLOR rgb(192,192,192), rgb(45,121,147) ;
       TITLE xTITLE+cDISP

//------ set up all tabs

    REDEFINE FOLDER oFLD1 ID 110 of oWORK ;
         PROMPT "&Parts", "&Labor", "&Tires", "&Outside" ;
         DIALOGS "PARTS", "LABOR", "TIRES", "OUTSIDE"

//----- parts tab

    REDEFINE xBROWSE oLBX       ;
    ID 111 of oFld1:aDialogs[1] ;
    RECORDSET oRsItem           ;
    COLUMNS "QTY",              ;
            "ITYPE",            ;
            "PREFIX",           ;
            "DESCRIP",          ;
            "PRICE1",           ;
            "EXTEND"            ;
    COLSIZES 25,25,105,170,75,75 ;
    HEADERS "Qty",              ;
            "Tp",               ;
            "StockNo",          ;
            "Description",      ;
            "Price",            ;
            "Extend"            ;
    AUTOSORT AUTOCOLS LINES CELL
 


Code: Select all | Expand


PARTS DIALOG 13, 18, 347, 128
STYLE WS_CHILD | 0x4
{
 CONTROL "", 111, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 48, 3, 292, 114
 PUSHBUTTON "&Add Parts", 114, 3, 9, 39, 14
 PUSHBUTTON "&Edit Parts", 115, 3, 25, 39, 14
 PUSHBUTTON "&Del Parts", 116, 3, 41, 39, 14
}
 


I am STUMPED !!

Rick Lipkin
User avatar
Armando
Posts: 3279
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Been thanked: 4 times
Contact:

Re: Vertical scroll wbrowse on folders

Post by Armando »

Rick:

As you can see in the next image I have a dialog with nine folders and each has his own vertical scroll bar.

Image

I define the RC as follow, perhaps this can help you.

Code: Select all | Expand


QRYPRO2 DIALOG DISCARDABLE 6, 15, 568, 265
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
{
  CONTROL "TXBrowse", 200, "TXBrowse", 0x00000000, 5, 5, 557, 247
}
 


If I can help, pls let me know it.

BTW, I use FW810

Best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Vertical scroll wbrowse on folders

Post by Rick Lipkin »

To All

Here is what I am dealing with .. hopefully the image will reveal my problem.

Rick

Image
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Vertical scroll wbrowse on folders

Post by Daniel Garcia-Gil »

Hello Rick Lipkin

Please post how you create TxBroswe ( all )
or some test with the problems...

thanks....
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Vertical scroll wbrowse on folders

Post by James Bott »

Rick,

From your screenshot it appears that the scrollbar is off the edge of the folder. Try making the description field narrower to see if the scrollbar shows up. If that does it, then you are going to have to make the dialog and folders wider.

James
User avatar
Rick Lipkin
Posts: 2677
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Vertical scroll wbrowse on folders

Post by Rick Lipkin »

James, Daniel

I think James is correct .. apparently my resource dialog on the folder is too big .. I am SOOO sorry I think I can work this out ..

Rick

[img]
http://img444.imageshack.us/img444/6392/parts.jpg
[/img]
Post Reply