show deleted Record with

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

show deleted Record with

Post by AUGE_OHR »

hi,

i have

Code: Select all

   ALLOWDELETE .T.
   DYNAMICFORECOLOR { bColor , bColor } // just have 2 Field
and a Codeblock like this

Code: Select all

PUBLIC bColor  := {|| IF(Del_Color(), {128,128,128} , {128,255,255} ) }

FUNCTION Del_Color()
LOCAL nRow := Getproperty( "ReplayTo", "Grid_Reply", "CellRowFocused" )
   ORDKEYGOTO(nRow)  // have Index so ORDKEYGOTO() instead of GOTO()
   IF DELETED()
      lRet := .T.
   ELSE
      lRet := .F.
   ENDIF
RETURN lRet
it change Color ... but more than i want :(
so how get it "stable" to show when Record is Deleted() :?:
have fun
Jimmy
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: show deleted Record with

Post by dragancesu »

Look some dbf database manager
usually display field with status (ok/delete)
deleted.jpg
deleted.jpg (126.94 KiB) Viewed 3089 times
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: show deleted Record with

Post by AUGE_OHR »

hi,

thx for Answer.

can you please provide some Code so i can learn what i'm doing wrong, thx
have fun
Jimmy
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: show deleted Record with

Post by dragancesu »

User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: show deleted Record with

Post by AUGE_OHR »

hi,
thx for Link ... where do i find Source :?:

i like to learn how DYNAMICFORECOLOR work and what i'm doing wrong, thx
have fun
Jimmy
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: show deleted Record with

Post by dragancesu »

\hmg3.4.4\samples\controls\grid\grid_08
\hmg3.4.4\samples\controls\grid\grid_19
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: show deleted Record with

Post by esgici »

AUGE_OHR wrote: Mon Dec 09, 2019 11:55 pm ... where do i find Source :?:
somewhere around here: search.php?st=0&sk=t&sd=d&sr=posts&keywords=dba

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: show deleted Record with

Post by AUGE_OHR »

hi,
dragancesu wrote: Tue Dec 10, 2019 9:19 am \hmg3.4.4\samples\controls\grid\grid_08
\hmg3.4.4\samples\controls\grid\grid_19
thx for Link.
Yes they show Icon "at create" but those Sample are not "connect" to DBF where i have DELETED() Records

---

have found c:\MiniGUI\SAMPLES\BASIC\DualBrowse\myevents.prg
this Demo make what i want but it seems Different to H_WINDOWS.PRG
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: show deleted Record with

Post by AUGE_OHR »

esgici wrote: Tue Dec 10, 2019 11:38 am
AUGE_OHR wrote: Mon Dec 09, 2019 11:55 pm ... where do i find Source :?:
somewhere around here: search.php?st=0&sk=t&sd=d&sr=posts&keywords=dba
ok found it here http://hmgforum.com/viewtopic.php?f=10& ... t&start=50
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: show deleted Record with

Post by AUGE_OHR »

hi,

GOT it :D

my last Problem was that navigation was not "sync" to Pointer of DBF

Code: Select all

FUNCTION Del_Color()
LOCAL nRow := Getproperty( "ReplayTo", "Grid_Reply", "CellRowFocused" )
   ORDKEYGOTO(nRow) // have Index
also "refresh" make Problem ... hm

than i saw c:\MiniGUI\SAMPLES\BASIC\DualBrowse\
that Sample use CheckBox so i ask for CheckBox Sample ... wrong Way

next i recognize than this Sample use BROWSE not GRID ... :roll:

1st i try to replace GRID in FMG (not in IDE) with BROWSE but that IDE does not like :lol:
ok, i made a new FMG with BROWSE and take Parameter from old FMG to new

Code: Select all

    DEFINE BROWSE Grid_Reply // same old name
        WIDTHS {200,200}
        HEADERS {"Reply To","From"}
        WORKAREA REPLYTO
        FIELDS {"REPLYTO->REPLYTO" , "REPLYTO->FROM"}
as i use "old" Control Name all work fine so i start again with Color

Code: Select all

PUBLIC bColor  := {|| IF(Del_Color(), {192,192,192} , {128,255,255} ) }
PUBLIC bColor1 := {|| {56,56,56} }

	DYNAMICBACKCOLOR {bColor1,bColor1}
        DYNAMICFORECOLOR {bColor,bColor}
but again i had a "sync" Problem :(

when reading in HMG DOC file about BROWSE i saw this
SET BROWSESYNC
i search in HMG Sample but none have it but c:\MiniGUI\SAMPLES\BASIC\DualBrowse\ have SET BROWSESYNC

SET BROWSESYNC in Main and "rem"

Code: Select all

* ORDKEYGOTO(nRow) // have Index
now Dynamic Color work :D

---

i have read under SET BROWSESYNC
BROWSE is a compatibility (obsolete) control and therefore not recommended.
It is superseded by the GRID control.
hm ... but BROWSE "is" a GRID, or :?:

Code: Select all

c:\hmg.3.4.4\SOURCE\c_browse.c
c:\hmg.3.4.4\SOURCE\h_browse.prg
in h_browse.PRG is also BROWSESYNC but not in h_grid.prg or h_GridEx.prg :o
so how to "sync" DBF with GRID :?:

BROWSE Refresh work with SET BROWSESYNC
GRID Refresh seems not to work ... while have no BROWSESYNC :?:

so what do i miss with GRID :?:
have fun
Jimmy
Post Reply