Simulate Rpreview for tablet

Simulate Rpreview for tablet

Postby Silvio.Falconi » Sat Sep 30, 2017 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Simulate Rpreview for tablet

Postby cnavarro » Sat Sep 30, 2017 3: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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Simulate Rpreview for tablet

Postby Silvio.Falconi » Sun Oct 01, 2017 8: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: Select all  Expand view  RUN

 ::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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7076
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests