Save and restore arrays

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 547
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 68 times
Been thanked: 121 times

Re: Save and restore arrays

Post by AUGE_OHR » Fri Feb 14, 2020 3:34 pm

hi,

ok, understand.

have made a Sample with FieldWideStatic and Show()/Hide() Form with Checkbox "when running" how it can be used
FieldWideStatic.ZIP
(1.3 KiB) Downloaded 15 times
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 547
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 68 times
Been thanked: 121 times

Post by AUGE_OHR » Fri Feb 14, 2020 3:45 pm

RPC wrote:
Fri Feb 14, 2020 2:44 pm
Perhaps you can also help with "save" bitmap image problem I have mentioned above.
try other Bitmap ... something does not work but my Bitmap (16x16) work as Resource
Bad_BMP.jpg
Bad_BMP.jpg (14.09 KiB) Viewed 130 times
have fun
Jimmy

RPC
Posts: 167
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 57 times
Been thanked: 8 times

Post by RPC » Fri Feb 14, 2020 6:05 pm

Hi Jimmy
Your program works till we are in the program when we leave the program and run it again it does not maintain the same state of check boxes.
The state is in fact not saved(to disk for restoration later) in your program.
Thanks though for your efforts.

RPC
Posts: 167
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 57 times
Been thanked: 8 times

Post by RPC » Fri Feb 14, 2020 6:07 pm

AUGE_OHR wrote:
Fri Feb 14, 2020 3:45 pm
try other Bitmap ... something does not work but my Bitmap (16x16) work as Resource
This works. I changed my bitmap image size to 16x16 and now it shows on the button
Thanks for the help.

edk
Posts: 530
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 139 times
Been thanked: 448 times

Post by edk » Sat Feb 15, 2020 4:39 pm

Hi RPC.
Recently, I worked on something similar, except that I needed to be able to set 27 checkboxes for each record. I didn't want to do 27 fields for each record, so I was looking for a solution to "encode" them in one field. Since I don't expect more checkboxes than 32, I used a 32-bit number to encode their state, which I then encoded into a binary string. And so to encode 32 checkboxes, a string of 4 characters is enough.

My sample:
GRID_25.7z
(3.07 KiB) Downloaded 22 times
To edit checkboxes just press Enter or doubleclick on ">> Show <<" fields.

Edward.

Post Reply