Eliminate Editing Icons XBROWSE MySql

Eliminate Editing Icons XBROWSE MySql

Postby PAUL SIMM » Mon Nov 06, 2023 11:48 am

I need to Browse a MySql table in Read only mode.

oCn :=maria_Connect( cHost,cUser,cDb,cPwd )

cQuery:="SELECT * FROM EVENTOS"

oTb:=oCn:RowSet( cQuery,.t. )

xbrowser oTb TITLE "Eventos "

oCn:Close()

Works and is readonly but the ADD + EDIT and DELETE Icons are shown at the top of the Browse although the do'nt do anything.

Is there an easy way to hide them?
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Re: Eliminate Editing Icons XBROWSE MySql

Postby nageswaragunupudi » Mon Nov 06, 2023 3:19 pm

Code: Select all  Expand view
XBROWSER oTb TITLE "Eventos" SETUP ;
oBrw:oWnd:bInit := { |Self| ::oBar:Del( 5 ), ::oBar:Del( 5 ), ::oBar:Del( 5 ) }
Regards

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

Re: Eliminate Editing Icons XBROWSE MySql

Postby PAUL SIMM » Mon Nov 06, 2023 3:46 pm

Thankyou sir it works your a genius.

Kind Regards
Paul
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Re: Eliminate Editing Icons XBROWSE MySql

Postby Detlef » Mon Nov 06, 2023 7:44 pm

Hi Paul,
please be aware of double clicks inside xbrowse which will start editing.

Regards, Detlef
User avatar
Detlef
 
Posts: 207
Joined: Mon Feb 07, 2022 9:54 pm

Re: Eliminate Editing Icons XBROWSE MySql

Postby nageswaragunupudi » Tue Nov 07, 2023 2:00 am

Detlef wrote:Hi Paul,
please be aware of double clicks inside xbrowse which will start editing.

Regards, Detlef


Code: Select all  Expand view
XBROWSER aData SETUP ( ;
 oBrw:oWnd:bInit := { |Self| ::oBar:Del( 5 ), ::oBar:Del( 5 ), ::oBar:Del( 5 ) }, ;
 oBrw:bLDblClick := nil )
Regards

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

Re: Eliminate Editing Icons XBROWSE MySql

Postby PAUL SIMM » Tue Nov 07, 2023 9:03 am

Thanks for the advice.

Double Click does open the edit screen but editing is disabeld because of the .t. in oTb:=oCn:RowSet( cQuery,.t. )
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Re: Eliminate Editing Icons XBROWSE MySql

Postby nageswaragunupudi » Tue Nov 07, 2023 9:51 am

PAUL SIMM wrote:Thanks for the advice.

Double Click does open the edit screen but editing is disabeld because of the .t. in oTb:=oCn:RowSet( cQuery,.t. )


Using the code in my second posting, double click will not any more open edit screen.
Better you use this version.

Note: Dbl-click to open edit screen is not a feature of basic xbrowse. It is a functionality provided by xbrowser. We can disable it as I have advised in the code.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

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