FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A little correction on Get Action Bitmap
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
A little correction on Get Action Bitmap
Posted: Wed Jun 23, 2010 07:43 AM
Dear All,

Anyone using Get with Action and Bitmap Clause..

Before:



minor coding:
Code (fw): Select all Collapse
AEval( aGetObjs, {|a| IF(Upper(a:Classname()) == 'TGET',;
                      IF( a:oBtn <> Nil, ( a:oBtn:nWidth -= 1, a:oBtn:nHeight -= 1 ),Nil) ,Nil) })


Results:


The action bitmap is now visually better.


I hope this will be fix in v10.6


Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: A little correction on Get Action Bitmap
Posted: Wed Jun 23, 2010 08:30 AM

Frances,

Please test samples\GetBtn.prg and post here a screenshot of it, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: A little correction on Get Action Bitmap
Posted: Wed Jun 23, 2010 09:46 AM
Dear Mr. Antonio,

I tried/read "getbtn.prg" but declaration is diff not redefined.

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd, cTest := "Hello world!"

   DEFINE WINDOW oWnd COLOR "N/W*"

   @ 2, 2 GET cTest SIZE 110, 22 ;
      ACTION MsgInfo( "click" ) BITMAP "..\bitmaps\16x16\find.bmp"

   ACTIVATE WINDOW oWnd

return nil


Screenshot:



my redefined action Get:
Code (fw): Select all Collapse
REDEFINE GET oGet VAR cVar;
         ID 1015 OF oDlg UPDATE;
         BITMAP 'client16';
         ACTION msginfo('here')


RC:
Code (fw): Select all Collapse
...
  CONTROL "",1015,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,78,75,124,12,WS_EX_CLIENTEDGE
...



Maybe there's a difference between redefine and command @..


Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: A little correction on Get Action Bitmap
Posted: Wed Jun 23, 2010 11:42 AM
Frances,

In source\classes\TGet.prg please modify these lines:
Code (fw): Select all Collapse
            ::oBtn := TButtonBmp():New( 0, ::nWidth - nBmpWidth - If( ::lSpinner, 20, 4 ),, Self, {|| Eval( oThis:bAction, oThis ) }, ;
            nBmpWidth, ::nHeight - 4,,,,.t.,,,,,,,::cBmpName )

Use - 5 instead of - 4 and please check the results, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: A little correction on Get Action Bitmap
Posted: Wed Jun 23, 2010 11:55 AM
This may be a better implementation:
Code (fw): Select all Collapse
::oBtn := TButtonBmp():New( 0, ::nWidth - nBmpWidth - If( ::lSpinner, 20, 4 ),, Self, {|| Eval( oThis:bAction, oThis ) }, ;
            nBmpWidth, ::nHeight - If( ::oWnd:IsKindOf( "TDIALOG" ) .and. ! Empty( ::oWnd:cResName ), 5, 4 ),,,,.t.,,,,,,,::cBmpName )
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion