To Nages: Proposal for implementation

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Wed May 15, 2013 7:11 am

James,
I see you not understand me
Please see this picture

Image

you're seeing sure the toolbar near the top of the browse

how I can to realize it with fwh using Ttoolbar class ?

I explain you :
I cannot draw a ttoolbar class at x,y because the class not have the coordinates ( x,y) but only on the top or or the bottom of the ownd or dlg

this is the matter!!!

Can we resolve it to create thettoolbar at specific x,y ?
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby James Bott » Wed May 15, 2013 7:30 am

Put everything on a panel and the panel on the dialog or window.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Wed May 15, 2013 3:48 pm

I allready thinked to resolve with tpanel but I hoped there was a good solution because with tpanel is easy made a def control error
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Thu May 16, 2013 9:35 am

James,

I not understood how make it
I understand I can put on a panel each control but it not run ok

this is a small test , I used Tpanel , with customer.dbf

at init i see the tpanel then when I wish hide the tpanel it make def control error

Code: Select all  Expand view



#include 'fivewin.ch'
#include 'ord.ch'
#include 'xbrowse.ch'
#include 'hbcompat.ch'
REQUEST DBFCDX

#define  nHeightBar  35
#define  nHeightBtn  35
#define  nWidthBtn    33

static ltoolBar:=.t.
static oBar

Function test()
Local oDlg, oBrw
 RDDSETDEFAULT( "DBFCDX" )
   USE CUSTOMER  ALIAS CUST
 Define DIALOG oDlg TITLE "Searching Customers - " ;
         FROM 452, 774 to 870, 1303 PIXEL COLOR 0, 14215660
 @ 80,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      AUTOCOLS ALIAS "CUST" CELL LINES NOBORDER
  oBrw:bRCLicked := {|nRow,nCol| MenuOption(oDlg,nRow,nCol,"BA",oBrw) }
                 oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg  CENTERED;
                 ON INIT ChangeSize(oBrw,ltoolBar,oDlg)
     RETURN NIL
//------------------------------------------------------------------------------------//
Function ChangeSize(oGrid,ltoolBar,oDlg)
nOldTop:= oGrid:ntop
nOldBottom:=oGrid:nBottom
    If ltoolBar
         CreateToolBar( oGrid,oDlg,ltoolBar)
         oGrid:nTop:= nOldTop +nHeightBar
         oGrid:nHeight:=oGrid:nBottom+nHeightBar
      Else
          If oBar!=NIL
            oBar:End()
           Endif
         oGrid:nTop:=nOldTop -nHeightBar
         oGrid:nHeight:=oGrid:nBottom -nHeightBar
      Endif
      oGrid:refresh()
Retur nil
//------------------------------------------------------------------------------------//
Function CreateToolBar( oGrid,oDlg,ltoolBar)
   lOCAL oBrush1,oBtns
   DEFINE BRUSH oBrush1 COLOR RGB(143,172,230)
   If ltoolBar
       oBar:= TPanel():New(oGrid:nTop-5,oGrid:nLeft,(oGrid:nTop-5)+nHeightBar,oGrid:nwidth,oDlg)
  *   oBar:Setbrush(oBrush1)
      oBtns:= TBar():New(oBar)
       oBtns:ntop := 1
       oBtns:nLeft:= 1
       oBtns:nwidth :=oBar:nwidth-1
       oBtns:nbottom:= oBar:nbottom
       oBtns:l2010 :=.t.
       oBtns:l3D   :=.t.



DEFINE BUTTON OF oBtns  ;
      RESOURCE "LOOK_TOP"      ;
      TOOLTIP i18n( "Primo record" ) ;
      MESSAGE i18n( "Primo record dell'elenco.." ) ;
      ACTION oGrid:KeyDown(VK_HOME, 0)
//buttons
      DEFINE BUTTON OF oBtns  ;
      RESOURCE "LOOK_TOP"      ;
      TOOLTIP i18n( "Primo record" ) ;
      MESSAGE i18n( "Primo record dell'elenco.." ) ;
      ACTION oGrid:KeyDown(VK_HOME, 0)
      DEFINE BUTTON OF oBtns  ;
      RESOURCE "LOOK_PREV"      ;
      TOOLTIP i18n( "Record Precedente" ) ;
      MESSAGE i18n( "Retrocede di un record dell'elenco" ) ;
      ACTION oGrid:KeyDown(VK_UP, 0)
       DEFINE BUTTON OF oBtns  ;
      RESOURCE "LOOK_NEXT"      ;
      TOOLTIP i18n( "Record successivo" ) ;
      MESSAGE i18n( "Avanza di un record nell'elenco" ) ;
      ACTION oGrid:KeyDown(VK_DOWN, 0)
      DEFINE BUTTON OF oBtns  ;
      RESOURCE "LOOK_BOTTOM"      ;
      TOOLTIP i18n( "Ultimo record" ) ;
      MESSAGE i18n( "Ultimo Record dell'elenco" ) ;
      ACTION oGrid:KeyDown(VK_END, 0)













   ELSE
   If oBar!=NIL
      oBar:End()
   Endif
ENDIF
 oDlg:refresh()
return nil
 //------------------------------------------------------------------------------------//
Function MenuOption(oDlg,nRow,nCol,cDbf,oGrid)
LOCAL oMenu
MENU oMenu POPUP 2007
           SEPARATOR
           MENUITEM "Show ToolBar";
           WHEN { |o| o:SetCheck( ltoolBar ), .t. } ;
           ACTION ( ltoolBar :=!ltoolBar,;
                   ChangeSize(oGrid,ltoolBar,oBar),oGrid:refresh(),;
                   oMenuItem:SetCheck( ltoolBar ))
           SEPARATOR
          ENDMENU
          ACTIVATE POPUP oMenu OF oDlg AT  oGrid:nTop+nRow, oGrid:nLeft+nCol
RETURN (NIL




the error

Code: Select all  Expand view

Application
===========
   Path and name: C:\work\errori\barcust\test.Exe (32 bits)
   Size: 2,212,352 bytes
   Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
   FiveWin  Version: FWHX 13.01
   Windows version: 5.1, Build 2600 Service Pack 2

   Time from start: 0 hours 0 mins 4 secs
   Error occurred at: 05/16/13, 11:55:26
   Error description: Warning BASE/1004  Message not found: TPANEL:DEFCONTROL

Stack Calls
===========
   Called from: source\rtl\tobject.prg => TPANEL:ERROR( 172 )
   Called from: source\rtl\tobject.prg => TPANEL:MSGNOTFOUND( 205 )
   Called from: source\rtl\tobject.prg => TPANEL:DEFCONTROL( 0 )
   Called from: .\source\classes\TPANEL.PRG => TPANEL:NEW( 55 )
   Called from: test.prg => CREATETOOLBAR( 85 )
   Called from: test.prg => CHANGESIZE( 60 )
   Called from: test.prg => (b)MENUOPTION( 179 )
   Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 494 )
   Called from: test.prg => MENUOPTION( 185 )
   Called from: test.prg => (b)TEST( 37 )
   Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN( 1970 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:RBUTTONDOWN( 3707 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1724 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11739 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3177 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
   Called from: test.prg => TEST( 46 )
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Thu May 16, 2013 1:01 pm

ok I resolved
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby James Bott » Thu May 16, 2013 2:02 pm

Glad to hear you got it working. Please post the solution for everyone's reference.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Thu May 16, 2013 2:28 pm

on menu option there is an error
MENUITEM "Show ToolBar";
WHEN { |o| o:SetCheck( ltoolBar ), .t. } ;
ACTION ( ltoolBar :=!ltoolBar,;
ChangeSize(oGrid,ltoolBar,oBar),oGrid:refresh(),;
oMenuItem:SetCheck( ltoolBar ))

this line is right:
ChangeSize(oGrid,ltoolBar,oDlg),oGrid:refresh(),;
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby James Bott » Thu May 16, 2013 3:41 pm

So what was the fix for the error?
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Sat May 18, 2013 7:29 am

oBar instead of oDlg

But I not Know How erase black border
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Sat May 18, 2013 7:38 am

I want return back to Dos I used a function so easy to show a dbedit and return a value in clipper !!!
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby FranciscoA » Fri May 31, 2013 8:14 pm

Silvio.Falconi wrote:But I not Know How erase black border


Silvio,
Can you show us, a screen over how it looks?
I mean, as seen in your work already completed..
Thanks.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Sat Jun 01, 2013 7:18 am

not rselved also!!
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Nages: Proposal for implementation

Postby FranciscoA » Sat Jun 01, 2013 5:17 pm

Silvio.Falconi wrote:But I not Know How erase black border


If you want, you can try to modify these lines in the classe TBar, as follows:
viewtopic.php?f=6&t=26444#p145940
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: To Nages: Proposal for implementation

Postby Silvio.Falconi » Sat Jun 01, 2013 8:39 pm

I saw thanks
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 109 guests