for the reservations program I show the list of services in an xbrowse, if I change my reservation and it doesn't have the services I must not show the xbrowse
I tried with
IF oBrw != NIL
oBrw:Destroy() //end()
Endif
but nothing happens the oBrw is allway there
any solution pls ?
destroy a xbrowse
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 4 times
destroy a xbrowse
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
Re: destroy a xbrowse
Silvio,
just use
oBrw:Move( 0, 0 )
that will not harm any data
regards
Uwe
just use
oBrw:Move( 0, 0 )
that will not harm any data
regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 4 times
Re: destroy a xbrowse
ukoenig wrote:Silvio,
just use
oBrw:Move( 0, 0 )
that will not harm any data
regards
Uwe
Uwe,
I explain YOU
I have the browse on a Vtaskbar as you can see here
I need this xbrowse to view the services for each order but it is also possible that an order may not have the services
this is activated when I press on an umbrella, obviously in this figure it is not there because since it doesn't work I have removed it

but I think it's clear to give you the idea
when I change umbrella I go to load the data from an archive by making a scope on the order number and I create an array aItems to show it on a xbrowse
local nInvoice:=alltrim(cNumPre)
IF Empty( nInvoice)
aItems:={}
// Close the vtaskbar I make a switch but the user could b reopen it manually with the mouse
oVMenu5:Refresh()
oVMenu5:lOpened :=.T.
oVMenu5:Switch()
// I wish delete the oBrw but it is possible that the oBrw was not built previously because there are also orders without the services included
// if Make oBrw:Move(0,0) give me error also if I made oBrw:end() or oBrw:destroy()
IF oBrw !=NIL
oBrw:Move(0,0) // Not run !!!
Endif
RETURN NIL
ELSE
oVMenu5:lOpened :=.F.
oVMenu5:Switch()
oRighe:= TRigheReserva():New()
oRighe:OrdScope( TOPSCOPE, nInvoice )
oRighe:OrdScope( BOTTOMSCOPE, nInvoice )
oRighe:gotop()
DO while !oRighe:eof()
aadd(aItems,{oRighe:ico,oRighe:Desc,oRighe:Qta,oRighe:dataini,oRighe:datafin} )
oRighe:Skip()
ENDDO
nInvoice:=""
oRighe:OrdScope( TOPSCOPE, NIL )
oRighe:OrdScope( BOTTOMSCOPE, NIL )
oRighe:close()
ENDIF
IF len(aItems)>0
@30,2 XBROWSE oBrw OF oVMenu5 ;
COLUMNS 1, 2, 3 , 4 , 5 ;
HEADERS "ico","desc","qta", "dal", "al" ;
COLSIZES 20, 40,20,60,60 ;
ARRAY aItems ;
SIZE -5,-10 PIXEL NOBORDER
.....
Endif
return nil

when I change umbrella I do the same operation obviously changes the order number
but it happens that I always see the same xbrowse with the same content how do I delete the array and the xbrowse every time?
to make yourself understood follow the video
umbrella 83 does not have services because it does not even have order

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
- Marc Venken
- Posts: 1485
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: destroy a xbrowse
Silvio,
Maybe you can consider to Hide the xbrowse in stead of destroy it. If the data has no services, you could hide the colums ?
static function ReArrangeCols( oBrw, aCols )
AEval( oBrw:aCols, { |o| o:lHide := .f. } )
oBrw:ReArrangeCols( aCols )
AEval( oBrw:aCols, { |o| o:lHide := .t. }, Len( aCols ) + 1 )
oBrw:Refresh()
return nil
Showing a empty browse when there are no services is what i would do... but that is your choise !!
Maybe you can consider to Hide the xbrowse in stead of destroy it. If the data has no services, you could hide the colums ?
static function ReArrangeCols( oBrw, aCols )
AEval( oBrw:aCols, { |o| o:lHide := .f. } )
oBrw:ReArrangeCols( aCols )
AEval( oBrw:aCols, { |o| o:lHide := .t. }, Len( aCols ) + 1 )
oBrw:Refresh()
return nil
Showing a empty browse when there are no services is what i would do... but that is your choise !!
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
- Silvio.Falconi
- Posts: 7170
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 4 times
Re: destroy a xbrowse
Not Run, I erase all
I insert services on a box on msgbar
I insert services on a box on msgbar
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: destroy a xbrowse
I am not sure if I understood what you want correctly.
If you want to hide and unhide xbrowse, you can use:
Hide
Show again
If you want to hide and unhide xbrowse, you can use:
Hide
Code: Select all | Expand
oBrw:Disable()
oBrw:Hide()
Show again
Code: Select all | Expand
oBrw:Show()
oBrw:Enable()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India