html forms a desktop app
Re: html forms a desktop app
You can just add the SCROLLBARS clause to DCGETOPTIONS.
The eXpress train is coming - and it has more cars.
Re: html forms a desktop app
Roger,
I'm trying to create a scrolling dialog..
i've used
@ 10,10 DCDIALOG oOnlineProfile DRAWINGAREA oDrawingArea SIZE nWidth,nHeight-100 ;
SCROLLBARS XBP_SCROLLBAR_VERT NOTITLEBAR BORDER XBPDLG_NO_BORDER
dcgetoptions are:
DCGETOPTIONS SAYWIDTH nSayWidth SAYVCENTER TABSTOP NOCONFIRM ;
PIXEL ;
HILITEGETS GRA_CLR_RED ;
NOMINBUTTON ;
NOMAXBUTTON ;
NORESIZE ;
SAYFONT "10.Arial" ;
ROWSPACE 20 ;
NOESCAPEKEY ;
SCROLLBARS XBP_SCROLLBAR_VERT
A vertical scrollbar appears on the right, but the dialog does not respond to up/down arrow, or mouse..
even entering gets, when pressing enter to a get that is off the screen, the dialog does not scroll up...
What option am i missing here ??
I hope your thanksgiving was thanks-full..
I'm trying to create a scrolling dialog..
i've used
@ 10,10 DCDIALOG oOnlineProfile DRAWINGAREA oDrawingArea SIZE nWidth,nHeight-100 ;
SCROLLBARS XBP_SCROLLBAR_VERT NOTITLEBAR BORDER XBPDLG_NO_BORDER
dcgetoptions are:
DCGETOPTIONS SAYWIDTH nSayWidth SAYVCENTER TABSTOP NOCONFIRM ;
PIXEL ;
HILITEGETS GRA_CLR_RED ;
NOMINBUTTON ;
NOMAXBUTTON ;
NORESIZE ;
SAYFONT "10.Arial" ;
ROWSPACE 20 ;
NOESCAPEKEY ;
SCROLLBARS XBP_SCROLLBAR_VERT
A vertical scrollbar appears on the right, but the dialog does not respond to up/down arrow, or mouse..
even entering gets, when pressing enter to a get that is off the screen, the dialog does not scroll up...
What option am i missing here ??
I hope your thanksgiving was thanks-full..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: html forms a desktop app
So this is NOT a Windows window, but instead an HTML form in a web browser?
This is going in a different direction than how this thread started.
The eXpress train is coming - and it has more cars.
Re: html forms a desktop app
Roger, Here's a test mockup screenshot...
the gets continue out of sight...
the gets continue out of sight...
- Attachments
-
- scrolldialog.jpg (291.32 KiB) Viewed 16235 times
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: html forms a desktop app
So how do you want the scrolling to work?
Do you want a scrollbar?
Do you want the get to scroll up when the user goes past the last get?
Do you want a scrollbar?
Do you want the get to scroll up when the user goes past the last get?
The eXpress train is coming - and it has more cars.
Re: html forms a desktop app
i want the dialog to behave just like a form in a browser.. if you tab or down arrow or up arrow to something off screen, the dialog will adjust to bring it into view.
if you mouse wheel, the dialog should respond by scrolling.
etc..
i would think if html styling is going to be a featured attraction down the road, this would also naturally fit in with that..
if you mouse wheel, the dialog should respond by scrolling.
etc..
i would think if html styling is going to be a featured attraction down the road, this would also naturally fit in with that..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: html forms a desktop app
XDEMO.EXE has a sample titled "Scrolling GETS" in Sample Group 1.
Code: Select all
#include dcdialog.ch
Function Main()
/* This example shows "Scrolling" @ DCSAY..GETs. Moving the
scrollbars will scroll the GETS in the window. Moving to a
GET which is outside the window area will scroll the GETS
up or down. Resizing the window will resize the GET area. */
LOCAL GetList := {}, i, bFieldName, nCount := 1, oStatic, ;
nVertOffset := 0, nHorizOffset := 0, oVertScroll, ;
oHorizScroll, oDlg, oCurrGet, bGotFocus
LOCAL aPopup := DC_GetPopupCaption( { '10.Marlett', 'u', 1 } )
CLOSE ALL
USE COLLECT NEW EXCL VIA DBFNTX
bGotFocus := {|a,b,o|_XSample38_3(o,oStatic,@nVertOffset, ;
@nHorizOffset,oVertScroll,oHorizScroll), ;
oCurrGet:=o}
@ 1,1 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX SIZE 50,8 ;
OBJECT oStatic
@ 1, 51.2 DCSCROLLBAR DATA nVertOffSet SIZE 3,8 ;
TYPE XBPSCROLL_VERTICAL RANGE 0,FCount() ;
AUTOTRACK ;
OBJECT oVertScroll ;
SCROLL { |a,x,o| nVertOffset := a[1]*20, ;
_XSample38_2(oStatic,nVertOffSet,nHorizOffset) }
@ 9.1, 1 DCSCROLLBAR DATA nHorizOffSet SIZE 50,1 ;
TYPE XBPSCROLL_HORIZONTAL RANGE 0,200 ;
AUTOTRACK ;
OBJECT oHorizScroll ;
SCROLL { |a,x,o| nHorizOffset := a[1], ;
IIF( a[2]==XBPSB_ENDSCROLL, ;
_XSample38_2(oStatic,nVertOffSet,nHorizOffset),nil)}
FOR i := 1 TO FCount()
IF Type(FieldName(i)) # 'M'
bFieldName := _XSample38_1('COLLECT->'+FieldName(i))
@ nCount,1 DCSAY FieldName(i) GET bFieldName ;
SAYRIGHT ;
SAYSIZE 15 ;
SAYEVAL {|o|o:cargo[3]:=o:currentPos()} ;
GETEVAL {|o|o:cargo[3]:=o:currentPos()} ;
POPUP IIF(Type(FieldName(i))=='D',{|d|DC_Popdate(d,,,,,,2)},nil) ;
PARENT oStatic ;
GOTFOCUS bGotFocus
ENDIF
nCount++
NEXT
DCREAD GUI ;
PARENT @oDlg ;
TITLE 'Scrolling GETS Demo' ;
FIT ;
MODAL ;
NOAUTORESTORE ;
ADDBUTTONS ;
EVAL { || oDlg:reSize := ;
{||_XSample38_4(oDlg,oStatic,oVertScroll,oHorizScroll), ;
Eval(bGotFocus,nil,nil,oCurrGet)}}
Sleep(100)
DC_GetPopupCaption(aPopup)
RETURN nil
/* ------------------- */
STATIC FUNCTION _XSample38_1( c )
RETURN {|x|IIF(x==nil,&(c),&(c):=x)}
/* ----------------------- */
STATIC FUNCTION _XSample38_2( oStatic, nVertOffset, nHorizOffset )
LOCAL aChildren := oStatic:ChildList(), i, aCargo, nRow, nCol
oStatic:lockUpdate(.t.)
FOR i := 1 TO LEN(aChildren)
aCargo := aChildren[i]:cargo[3] // user cargo is always :cargo[3]
nCol := aCargo[1]
nRow := aCargo[2]
aChildren[i]:setPos({nCol-nHorizOffset,nRow+nVertOffset})
NEXT
oStatic:lockUpdate(.f.)
oStatic:invalidateRect()
RETURN nil
/* ----------------------- */
STATIC FUNCTION _XSample38_3( oXbp, oStatic, nVertOffset, nHorizOffset, ;
oVertScroll, oHorizScroll )
IF Valtype(oXbp) = 'U'
RETURN nil
ENDIF
DO WHILE oXbp:currentPos()[2] < 0
nVertOffset += 20
_XSample38_2( oStatic, nVertOffset, nHorizOffset )
ENDDO
DO WHILE oXbp:currentPos()[2] > oStatic:currentSize()[2]-20
nVertOffset -= 20
_XSample38_2( oStatic, nVertOffset, nHorizOffset )
ENDDO
oVertScroll:setData(nVertOffset)
RETURN nil
/* ----------------------- */
STATIC FUNCTION _XSample38_4( oDlg, oStatic, oVertScroll, oHorizScroll )
oStatic:setSize({oDlg:currentSize()[1]-50, ;
oDlg:currentSize()[2]-120})
oVertScroll:setPos({oStatic:currentSize()[1] + 12, ;
oVertScroll:currentPos()[2]})
oVertScroll:setSize({oVertScroll:currentSize()[1], ;
oStatic:currentSize()[2]})
oHorizScroll:setSize({oStatic:currentSize()[1], ;
oHorizScroll:currentSize()[2]})
RETURN nil
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: html forms a desktop app
That example appears to work better and worse than the static scroll example in Sample Group 4. The scrolling gets does not appear to update the scroll bars relative position like the static scroll sample does, but the static scroll sample does not scroll the gets whereas the one in the sample group 1 does. Is it possible to scroll the gets when you are near the bottom of the viewing area, not just on the last visible one. That way you could see where you are on the screen as that next one or two items below the current position would be visible also.
I missed the sample in group 1 before, only saw the one in group 4 that did not appear to work as well.
I missed the sample in group 1 before, only saw the one in group 4 that did not appear to work as well.
Re: html forms a desktop app
Change _XSample38_3 as shown below to give you the desired results.Is it possible to scroll the gets when you are near the bottom of the viewing area, not just on the last visible one. That way you could see where you are on the screen as that next one or two items below the current position would be visible also.
Code: Select all
STATIC FUNCTION _XSample38_3( oXbp, oStatic, nVertOffset, nHorizOffset, ;
oVertScroll, oHorizScroll )
IF Valtype(oXbp) = 'U'
RETURN nil
ENDIF
DO WHILE oXbp:currentPos()[2] < 40 <<<<<<<<<<<<<<<<<
nVertOffset += 20
_XSample38_2( oStatic, nVertOffset, nHorizOffset )
ENDDO
DO WHILE oXbp:currentPos()[2] > oStatic:currentSize()[2]-60 <<<<<<<<<<<<<<<
nVertOffset -= 20
_XSample38_2( oStatic, nVertOffset, nHorizOffset )
ENDDO
oVertScroll:setData(nVertOffset)
RETURN nil
The eXpress train is coming - and it has more cars.
Re: html forms a desktop app
this change does scroll when the get nears the bottom of the screen, but the scrollbars are still not functional... nor does the mousewheel have any affect..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises