FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Simulate Rpreview for tablet
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Simulate Rpreview for tablet
Posted: Sat Sep 30, 2017 08:12 AM

How I can make a preview on a tablet ?
the normal rpreview is not touch and the user cannoet use menu and small button
Any solution ?

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Simulate Rpreview for tablet
Posted: Sat Sep 30, 2017 03:24 PM

Menu options do not get higher?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Simulate Rpreview for tablet
Posted: Sun Oct 01, 2017 08:54 AM
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
Code (fw): Select all Collapse
 ::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

Continue the discussion