Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
CheckGroup selection
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
LazTTF2Vector - An Enhanc...
by
domasz
[
Today
at 08:03:49 am]
App crashes in main menu ...
by
Igor Kokarev
[
Today
at 08:02:20 am]
[LazFreeType] effect on t...
by
domasz
[
Today
at 07:59:09 am]
to read an UTF8 text file
by
cdbc
[
Today
at 07:41:32 am]
Force parameters of my ap...
by
cdbc
[
Today
at 07:33:04 am]
Converting a Project from...
by
egsuh
[
Today
at 07:21:45 am]
Segmentation fault
by
cdbc
[
Today
at 07:21:05 am]
Connection to MySQL versi...
by
paweld
[
Today
at 06:32:04 am]
efficiency problem
by
photor
[
Today
at 05:26:02 am]
Error after installing ne...
by
sbulazel
[
Today
at 02:23:32 am]
PostgreSQL "no route to h...
by
wcage03
[March 15, 2025, 11:25:04 pm]
Can't start Lazarus 4.0 R...
by
mykyl
[March 15, 2025, 10:54:48 pm]
TControlBar and hence the...
by
paule32
[March 15, 2025, 10:20:25 pm]
How to Build Laz IDE from...
by
Barberr
[March 15, 2025, 10:08:20 pm]
NIL vs. Assign: when to u...
by
Remy Lebeau
[March 15, 2025, 09:48:31 pm]
PScript or MagicScript ad...
by
eldonfsr
[March 15, 2025, 09:44:53 pm]
Hooking to `OnISupport` d...
by
Remy Lebeau
[March 15, 2025, 09:42:20 pm]
Hustle - A simple task ma...
by
Hansvb
[March 15, 2025, 07:42:04 pm]
Bindings for PlutoVG
by
CynicRus
[March 15, 2025, 07:09:50 pm]
zeosdb zupdate don't work...
by
eldonfsr
[March 15, 2025, 06:11:23 pm]
IfThenStr does not work -...
by
Thaddy
[March 15, 2025, 04:43:13 pm]
[Solved] Exception "In Ha...
by
cdbc
[March 15, 2025, 04:34:14 pm]
File IO issues
by
dryzone
[March 15, 2025, 03:58:23 pm]
savescreen, restscrren
by
k1attila1
[March 15, 2025, 03:52:29 pm]
How to make RunCommand NO...
by
zxandris
[March 15, 2025, 03:17:07 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: CheckGroup selection (Read 591 times)
slowGoing
Newbie
Posts: 5
CheckGroup selection
«
on:
September 20, 2022, 11:20:57 am »
In a CheckGroup is the an option to capture all the selected checkboxes as a number, ie with 4 checkboxes there will be 0 to 15 depending on which ones are checked
Logged
BrunoK
Hero Member
Posts: 682
Retired programmer
Re: CheckGroup selection
«
Reply #1 on:
September 20, 2022, 12:37:06 pm »
Code: Pascal
[Select]
[+]
[-]
function
CheckGroupAsSet
(
aCheckGroup
:
TCheckGroup
)
:
qword
;
var
i
:
integer
;
begin
Result
:
=
0
;
for
i
:
=
aCheckGroup
.
Items
.
Count
-
1
downto
0
do
begin
Result
:
=
Result
shl
1
;
if
aCheckGroup
.
Checked
[
i
]
then
Result
:
=
Result
or
1
;
end
;
end
;
Logged
slowGoing
Newbie
Posts: 5
Re: CheckGroup selection
«
Reply #2 on:
September 21, 2022, 11:30:51 am »
Thanks for that, appreciated
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
CheckGroup selection
TinyPortal
© 2005-2018