FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New get at bottom of xBrowse!? ( Solved! )
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Mon Dec 22, 2008 01:37 PM

Dear Antonio and friends,

It's possible to create a new "get" object at bottom of xBrowse? With the width of it?
But in runtime!!

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Mon Dec 22, 2008 05:24 PM
Friends,

I'd like to use this object in the creation of xBrowse.
I tried with this code, but this returns to me a error
The code:
   ::oBrwGet := TGet():new( 0, 0,{ | u | If(PCount()==0,::uBrwGet,::uBrwGet:= u ) }, ::oWnd,0,0,"@!",,,,,.F.,,.F.,,.F.,,,,,.F.,.f.,.T.,,.F.,,,,)

   ::oBrwGet:Move( ::nBottom, ::nLeft, ::nWidth, ::nHeight, .T. )

The error:
Application
===========
   Path and name: C:\apps\test.EXE (32 bits)
   Size: 1,949,696 bytes
   Time from start: 0 hours 0 mins 37 secs 
   Error occurred at: 22/12/2008, 14:20:06
   Error description: Error FiveWin/1  Non defined Id: No:    104

Stack Calls
===========
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:INITIATE(0)
   Called from: C:\RepositorioLocal\extras\tget.prg => TGET:INITIATE(563)
   Called from:  => __OBJSENDMSG(0)
   Called from: .\source\function\HARBOUR.PRG => OSEND(0)
   Called from: .\source\function\HARBOUR.PRG => ASEND(0)
   Called from: C:\RepositorioLocal\extras\dialog.prg => TDIALOG:INITIATE(702)
   Called from: C:\RepositorioLocal\extras\dialog.prg => TDIALOG:HANDLEEVENT(954)
   Called from:  => DIALOGBOX(0)
   Called from: C:\RepositorioLocal\extras\dialog.prg => TDIALOG:ACTIVATE(273)
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Tue Dec 23, 2008 12:57 AM

I simply treat the as odbf:eof() ,as : go bottom ,skip (1)

oCol := obrow:AddCol()
oCol:bStrData := {||odb2:stockid}
oCol:cHeader := "编号"
oCol:bEditValue := {||odb2:stockid}
oCol:nEditType := {||if(ledit,1,0)}
oCol:bOnPostEdit := {|o, v, n| if( n != VK_ESCAPE .and. v != odb2:stockid,;
(if(odb2:EOF(),;
(odb2:stockid:=v,odb2:lmrp:="Y",odb2:APPEND(),obrow:refresh(),if(!oserver:lerror,obrow:SEEK(v),msgstop("编号重复!","停止"))),;
(stockid1:=odb2:stockid,odb2:stockid:=v,odb2:save(),obrow:refresh(),if(oserver:lError,(msgstop("编号重复或者单据已经使用而不能更改!","停止"),obrow:SEEK(stockid1)),obrow:SEEK(v)) );
);
), ;
) }

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Tue Dec 23, 2008 06:46 PM

Shuming,

Really, is not this what I want....

I want to create a object "tget" at bottom of xbrowse, with the same width of it... something like the hscroll of it..

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Tue Dec 23, 2008 11:03 PM

Julio,

do you mean a get like a footer?

Regards,
Detlef

Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Wed Dec 24, 2008 10:44 AM
VĂȘ se Ă© isso que vocĂȘ quer?(demarcado com as setas, porque nĂŁo funciona BBCode dentro da tag "code"

   oLbx := TXBrowse():New( oDlgBackup )
   oLbx:CreateFromResource( 100 )

   oLbx:SetArray( AZIP,.T.)
   oLbx:SetRDD(.F.,.T.)   //--> Estilo da barra de seleçao.

   //-- Estilo --------------------------------//
   oLbx:lUpdate:= .T.
   oLbx:nMarqueeStyle     := MARQSTYLE_HIGHLROW
   oLbx:nColDividerStyle  := LINESTYLE_LIGHTGRAY
   oLbx:nRowDividerStyle  := LINESTYLE_LIGHTGRAY
   oLbx:nHeaderLines      := 01   //-----------> Linhas do Cabecalho.
   oLbx:lAllowColSwapping := .F.  //-----------> Trocar Colunas
   oLbx:lAllowRowSizing   := .F.  //-----------> Nao move as Linhas
   oLbx:lFooter           := .T.  //-----------> Rodapé
--->>>   oLbx:nFooterLines      := 01   //-----------> Linhas do Rodapé.<<<---

   //-- Colunas -------------------------------//

   *1*Caminho
   oCol:= oLbx:aCols[1]
   oCol:bStrData  := { || CAMINHO  }
   oCol:cHeader   := "Caminho"
   oCol:nWidth    := 390
--->>>   oCol:cFooter   := cNumeroArquivos <<<---

   *2*Tamanho
   oCol:= oLbx:aCols[2]
   oCol:bStrData  := { || TAMANHO }
   oCol:cHeader   := "Tamanho"
   oCol:nWidth    := 90
   oCol:cFooter   := cTamanhoTotal

   *3*Status
   oCol:= oLbx:aCols[3]
   oCol:bStrData  := {|| CampoStatus("NOME")  }
   oCol:cHeader   := "Status"
   oCol:nWidth    := 70
   //-- Edição råpida através do browse
   oCol:nEditType      := EDIT_GET_LISTBOX
   oCol:aEditListTxt   := if(nRadBackup = 1, aStatusInc, aStatusExt)
   oCol:bOnPostEdit    := {|o,x| AlterarStatusGrid(x,oLbx:nRolSel()) }
   oCol:aEditListBound := if(nRadBackup = 1, {"A","I","O","R"}, {"E","I"})
   
   *4*FromZip
   oCol:= oLbx:aCols[4]
   oCol:Hide()

   //-- Alinhamento ---------------------------//

   oLbx:aCols[1]:nDataStrAlign := AL_LEFT
   oLbx:aCols[2]:nDataStrAlign := AL_RIGHT
   oLbx:aCols[3]:nDataStrAlign := AL_CENTER

   //-- Eventos -------------------------------//

   oLbx:bLDblClick:= { || AlterarStatusOnClick(oLbx:nRolSel()) }


E para atualizar o rodapé:
   
   //-- Atualiza o Rodapé
   oLbx:aCols[2]:cFooter := cTamanhoTotal
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Wed Dec 24, 2008 11:50 AM
Detlef Hoefner wrote:Julio,

do you mean a get like a footer?

Regards,
Detlef


Detlef,

Exactly!!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
New get at bottom of xBrowse!? ( Solved! )
Posted: Wed Dec 24, 2008 08:26 PM

Julio,

If your browse is on a dialog why not just place the GET there using Workshop?

If the browse is filling a window then I think the best way would be to subclass the browse to add the GET.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Fri Dec 26, 2008 02:19 PM
James Bott wrote:Julio,

If your browse is on a dialog why not just place the GET there using Workshop?

If the browse is filling a window then I think the best way would be to subclass the browse to add the GET.

Regards,
James


Yes James,

This is the second type! But, allways I get error with my source code...

I tried this code:
::oBrwGet := TGet():new( 0, 0,{ | u | If(PCount()==0,::uBrwGet,::uBrwGet:= u ) }, ::oWnd,0,0,"@!",,,,,.F.,,.F.,,.F.,,,,,.F.,.f.,.T.,,.F.,,,,)

   ::oBrwGet:Move( ::nBottom, ::nLeft, ::nWidth, ::nHeight, .T. )
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
New get at bottom of xBrowse!? ( Solved! )
Posted: Fri Dec 26, 2008 04:34 PM

Julio,

I don't understand your code. Is this inside a subclass of the browse? If so, can we see the entire subclass? Better yet, can we see a small example showing the problem?

If it is not in a subclass, then you cannot use a var like ::uBrwGet.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
New get at bottom of xBrowse!? ( Solved! )
Posted: Fri Dec 26, 2008 07:41 PM
James Bott wrote:Julio,

I don't understand your code. Is this inside a subclass of the browse? If so, can we see the entire subclass? Better yet, can we see a small example showing the problem?

If it is not in a subclass, then you cannot use a var like ::uBrwGet.

Regards,
James


James,

I tried to use like button of get with action clausule... Creating a class var ::oBrwBet for receiving the instance of Tget class... but, not works!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
New get at bottom of xBrowse!? ( Solved! )
Posted: Fri Dec 26, 2008 11:00 PM

Julio,

We need to see all the code.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
New get at bottom of xBrowse!? ( Solved! )
Posted: Sat Dec 27, 2008 04:40 AM

Julio,

I still don't understand what you are trying to do. You want to put a GET under the browse that is the same width as the browse? Are you trying to make it look like the last record of the browse? If so, why not just use the last record of the browse?

This code I don't understand:

::oBrwGet := TGet():new( 0, 0,{ | u | If(PCount()==0,::uBrwGet,::uBrwGet:= u ) }, ::oWnd,0,0,"@!",,,,,.F.,,.F.,,.F.,,,,,.F.,.f.,.T.,,.F.,,,,)

First, is this in a subclass of the browse? If so we need to see the subclass.

Why don't you just use xBase syntax like:

@ 1,1 GET oBrwGet var ::uBrwGet of ::oWnd

I don't think you can use an instance variable inside a codeblock. I think you are going to have to make ::uBrwGet a LOCAL.

@ 1,1 GET oBrwGet var uBrwGet of ::oWnd

I think I see what you are trying to do with this line:

::oBrwGet:Move( ::nBottom, ::nLeft, ::nWidth, ::nHeight, .T. )

But this is going to create a GET the same size and in the same place as the browse--I don't think that is what you want. You want to move it below the browse and use the height of the original GET not the height of the browse. You want to use ::oBrwGet:nHeight not ::nHeight.

Also, if you are trying to put both a browse and a GET into the client area of a window then you are going to have to shrink the normal browse by the height of the GET. This is not as simple as it might seem at first.

If you care to explain why you are tryihng to do this, I can perhaps offer an easier solution or an alternate way of accomplishing your goal.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Tue Dec 30, 2008 04:28 PM

James,

Thank you very much for you comprehension... I will try to make a small self example to you.
Please, wait a little time.

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Tue Dec 30, 2008 05:38 PM
Explanation:

When the user clicks the header of any column, the xbrowse should open a get at footer in the same, to perform an incremental search with that column

Like this image bellow, but I will work on "look & feel"!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9