Bugs in TButtonBmp

Bugs in TButtonBmp

Postby byte-one » Sat Jul 23, 2016 1:37 pm

1. There are the line
Code: Select all  Expand view
fwlog empty( ::clayout ), ! Empty( ::hBitmap )
in the method new(). Should be erased.
2. When i use clausula GDIPLUS and call the method ::loadbitmap() to change the bitmap, no bitmap to see. Without GDIPLUS is ok!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Bugs in TButtonBmp

Postby nageswaragunupudi » Sun Jul 24, 2016 11:11 pm

1) done.
2) Working for me with and without GDIP
btn:loadbmp( newfile ), btn:refresh()
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bugs in TButtonBmp

Postby byte-one » Mon Jul 25, 2016 8:52 am

Thanks, but i use a resource, not a file. Without GDIP is functioning perfect. I use a 16x16 bitmap.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Bugs in TButtonBmp

Postby nageswaragunupudi » Mon Jul 25, 2016 1:19 pm

I tried with this code
Code: Select all  Expand view
  @ 100, 90 BUTTONBMP PROMPT "Text" + CRLF + "Top" SIZE 140,140 PIXEL OF oWnd ;
      BITMAP "CLIP" TEXTTOP GDIP ACTION { |b| b:loadbitmap( "STAR" ), b:refresh() }
 

This is the relevant part of the rc file
Code: Select all  Expand view
CLIP BITMAP "../bitmaps/clip.bmp"
STAR BITMAP "../bitmaps/16x16/favorite.bmp"
 


This is working for me.

Probably this may not be working with some bitmaps. Can you suggest any bitmap in the fwh\bitmaps folder to reproduce the problem?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bugs in TButtonBmp

Postby byte-one » Mon Jul 25, 2016 3:03 pm

Try with REDEFINE?? If i not change with :loadbitmap() the the bitmap is shown normal. I will tomorrow use a other bitmap.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Bugs in TButtonBmp

Postby nageswaragunupudi » Mon Jul 25, 2016 3:31 pm

Can you please provide a simple rc file with dialog and some fwh bitmaps?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bugs in TButtonBmp

Postby byte-one » Mon Jul 25, 2016 6:08 pm

I found that this is only if GDIPLUS and SkinButtons() are using!!! In my program i am using Skinbuttons(). If i switch off the skins all is ok!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Bugs in TButtonBmp

Postby byte-one » Thu Aug 11, 2016 2:27 pm

Any news about this? The bug is in the functions of skinbuttons(), but i have not the complete Code. Antonio?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Bugs in TButtonBmp

Postby nageswaragunupudi » Thu Aug 11, 2016 3:01 pm

As of now, skinbuttons are compatible only with the legacy paint behavior.
Actually skinbuttons replaces the paint method of the button. While the paint method of buttons is greatly enhanced ( any kind of images, auto-resizing of images and also new styles of alignments) the skinbuttons paint method still handles the oldest painting logic.

Till we totally *re-write* skinbuttons code, this is compatible only with simple buttonbmps without gdiplus.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bugs in TButtonBmp

Postby richard-service » Thu May 04, 2023 5:13 am

nageswaragunupudi wrote:As of now, skinbuttons are compatible only with the legacy paint behavior.
Actually skinbuttons replaces the paint method of the button. While the paint method of buttons is greatly enhanced ( any kind of images, auto-resizing of images and also new styles of alignments) the skinbuttons paint method still handles the oldest painting logic.

Till we totally *re-write* skinbuttons code, this is compatible only with simple buttonbmps without gdiplus.


Dear Mr.Rao

Any News ... *re-write* skinbuttons code for TButtonBmp within bmp and TGet Action Button bmp.

Code: Select all  Expand view

       REDEFINE GET     ::oGet4 VAR ::cNo4  ID 104     OF ::oDlg UPDATE CHRGROUP CHR_WIDE BITMAP "BTN_FIND16" ACTION( oThis:Select_DC_NO() )
             
       REDEFINE BUTTONBMP oBtn[4] ID 701 OF ::oDlg  ;
                      BITMAP "BTN_CALENDAR16"             ;
                      TOOLTIP "輸入所選取的日期"          ;
                      ACTION ChooseCal2( ::oGet1, ::cNo1 )
 


Image
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Bugs in TButtonBmp

Postby karinha » Thu May 04, 2023 9:43 pm

Good evening Richard, PLS test this example. With XHARBOUR it works fine. With HARBOUR it doesn't work well(fail), it's something for the FiveTech Team(Rao) to check.

Buenas noches Richard, PLS prueba este ejemplo. Con XHARBOUR funciona bien. Con HARBOUR no funciona bien (falla), es algo que debe verificar el equipo de FiveTech (Rao).

Download complete:

https://mega.nz/file/EF9xUAYK#tk7-xn_ptC-isI6Mlkvizmzp14Va6KOvjNe533lxekU

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Bugs in TButtonBmp

Postby richard-service » Fri May 05, 2023 12:56 am

karinha wrote:Good evening Richard, PLS test this example. With XHARBOUR it works fine. With HARBOUR it doesn't work well(fail), it's something for the FiveTech Team(Rao) to check.

Buenas noches Richard, PLS prueba este ejemplo. Con XHARBOUR funciona bien. Con HARBOUR no funciona bien (falla), es algo que debe verificar el equipo de FiveTech (Rao).

Download complete:

https://mega.nz/file/EF9xUAYK#tk7-xn_ptC-isI6Mlkvizmzp14Va6KOvjNe533lxekU

Regards, Saludos.


These code look good, but I don't want it.
Code: Select all  Expand view

oGet1:lBtnTransparent := .T.       // transparent button get oGet1
oGet1:lAdjustBtn := .T.
 


Just waiting for Mr.Rao
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Bugs in TButtonBmp

Postby nageswaragunupudi » Sat May 06, 2023 3:59 pm

Mr. Richard

How can I reproduce your problem at my end so that I can understand what is happening?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bugs in TButtonBmp

Postby richard-service » Mon May 08, 2023 6:46 am

nageswaragunupudi wrote:Mr. Richard

How can I reproduce your problem at my end so that I can understand what is happening?


Mr.Rao

I found problem.

Problem code below:
Code: Select all  Expand view

Function Main()

Dialog1()
Dialog2()

oSQL_Erp32u := TWinCrane365():New()

RETURN

METHOD New() CLASS TWinCrane365

 SkinButtons()
 


No problem code below:
Code: Select all  Expand view

Function Main()

SkinButtons()
Dialog1()
Dialog2()

oSQL_Erp32u := TWinCrane365():New()

RETURN

METHOD New() CLASS TWinCrane365
 
 


SkinButtons() put in Function Main() no problem.
SkinButtons() put in CLASS xxx Method New() problem.
Last edited by richard-service on Mon May 08, 2023 7:08 am, edited 2 times in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 91 guests