Page 1 of 1
Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 11:48 am
by PAUL SIMM
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?
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 3:19 pm
by nageswaragunupudi
Code: Select all | Expand
XBROWSER oTb TITLE "Eventos" SETUP ;
oBrw:oWnd:bInit := { |Self| ::oBar:Del( 5 ), ::oBar:Del( 5 ), ::oBar:Del( 5 ) }
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 3:46 pm
by PAUL SIMM
Thankyou sir it works your a genius.
Kind Regards
Paul
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 7:44 pm
by Detlef
Hi Paul,
please be aware of double clicks inside xbrowse which will start editing.
Regards, Detlef
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 2:00 am
by nageswaragunupudi
Detlef wrote:Hi Paul,
please be aware of double clicks inside xbrowse which will start editing.
Regards, Detlef
Code: Select all | Expand
XBROWSER aData SETUP ( ;
oBrw:oWnd:bInit := { |Self| ::oBar:Del( 5 ), ::oBar:Del( 5 ), ::oBar:Del( 5 ) }, ;
oBrw:bLDblClick := nil )
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 9:03 am
by PAUL SIMM
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. )
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 9:51 am
by nageswaragunupudi
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.