I'm thinking to make a window for tablet
only with buttonbar with big buttons
we can create
TTabPreview From TPreview
but i not know how make it or insert a control on tPreview where it control if the device is a tablet
and use these commands
::oWndMain:bRClicked := { || ::oWndMain:Refresh() }
::oWndMain:bOnSettingChange := { |o,w,lp| WaitRefresh( ::oWndMain,w,lp ) }
::oWndMain:bOnDisplayChange := { || DlgResize( ::oWndMain, oThis:aBtnMain ) }
STATIC function DlgResize( oDlg, aBtn )
local i, j, n, r, c, w, h
WITH OBJECT oDlg
:nWidth := Int( ScreenWidth() * 0.85 )
:nHeight := Int( ScreenHeight() * 0.85 )
w := ( :nWidth - 60 ) / 4
h := ( :nHeight - 80 ) / 3
END
r := 20
n := 1
for i := 1 to 3
c := 20
for j := 1 to 4
WITH OBJECT aBtn[ n ]
:nTop := r
:nLeft := c
:nWidth := w - 10
:nHeight := h - 10
END
n++
c += w
next j
r += h
next i
oDlg:Center()
oDlg:Refresh()
return nil
//-----------------------------------------------------------------------------------------//
static function WaitRefresh( ownd, w, l )
static n := 0
if oTimer == nil
DEFINE TIMER oTimer OF oWnd INTERVAL 400 ;
ACTION ( n++, oWnd:Refresh(), If( n > 4, (oTimer:End(), oTimer := nil, n := 0), nil ) )
ACTIVATE TIMER oTimer
endif
return nil
//-----------------------------------------------------------------------------------------//
i use it for my tablet application with success on wnd main and all main dialogs and run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com