Another problem with Btnbmp

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Another problem with Btnbmp

Post by Silvio.Falconi »

I use btnbmp to open a Selection as you can see on this snapshot

Image

when I click on btnbmp is on the dialog lookup return this error

this is the error

Code: Select all

Application
===========
   Path and name: C:\Work\Errori\Numeri_Ombrelloni_sezione\test.Exe (32 bits)
   Size: 3,994,624 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.04
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 4 secs 
   Error occurred at: 06/11/20, 10:03:52
   Error description: Error BASE/1004  No exported method: ACTIVATE
   Args:
     [   1] = U   
     [   2] = N   42
     [   3] = N   34
     [   4] = O   TDIALOG
     [   5] = L   .F.

Stack Calls
===========
   Called from:  => ACTIVATE( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 981 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2043 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: test2.prg => TE
here the test

Code: Select all

#include "fivewin.ch"


Function Test()
   Local oDlg,oBtnSel
   local nElemento:=35
   local ctype:="01"
   local dFirst:=date()
   local dLast:=date()


   DEFINE DIALOG oDlg SIZE 200,200

   @ 07,17  BTNBMP oBtnSel FILENAME "selbtn.png";
   FLAT SIZE 20,14 PIXEL OF oDlg NOBORDER

      oBtnSel:oPopUp:= { |oBtn| ElementiVicini(nElemento,ctype,dFirst,dLast,oBtn) }


   ACTIVATE DIALOG oDLG
return nil

//----------------------------------------------------------------//

Function ElementiVicini(nElemento,ctype,dFirst,dLast,ocontrol)

local abtn:=array(2)

Local nBtnW :=25
Local nBtnH :=15
local nSelection:=0
local n:= 1
Local nRow:=10
Local nCol:=1

DEFINE DIALOG oDlg SIZE 260,190
  for n=1 to len(abtn)
  @ nRow,nCol BTNBMP abtn[n]   OF oDlg SIZE nBtnW,nBtnH FLAT CENTER
          abtn[n]:bAction := { | o | nSelection := o:Cargo, oDlg:end() }
    next
ACTIVATE DIALOG oDlg CENTERED

 return nSelection
 
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Another problem with Btnbmp

Post by nageswaragunupudi »

In the function ElementiVicini, declare oBtn as local variable
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Another problem with Btnbmp

Post by Silvio.Falconi »

make the same
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply