FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Eliminate Editing Icons XBROWSE MySql
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
Eliminate Editing Icons XBROWSE MySql
Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 03:19 PM
Code (fw): Select all Collapse
XBROWSER oTb TITLE "Eventos" SETUP ;
oBrw:oWnd:bInit := { |Self| ::oBar:Del( 5 ), ::oBar:Del( 5 ), ::oBar:Del( 5 ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 03:46 PM

Thankyou sir it works your a genius.

Kind Regards

Paul

Regards/Saludos
Paul

paul@pes-systems.net
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Mon Nov 06, 2023 07:44 PM

Hi Paul,

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

Regards, Detlef

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 02:00 AM
Detlef wrote:Hi Paul,
please be aware of double clicks inside xbrowse which will start editing.

Regards, Detlef
Code (fw): Select all Collapse
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
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 09: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Eliminate Editing Icons XBROWSE MySql
Posted: Tue Nov 07, 2023 09: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

Continue the discussion