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
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Need help converting a C+...
by
MathMan
[
Today
at 11:19:25 pm]
Convert string with Key-V...
by
Bart
[
Today
at 11:14:10 pm]
TurboBird IBX
by
rvk
[
Today
at 11:07:54 pm]
How to get at files that ...
by
Martin_fr
[
Today
at 10:47:18 pm]
Lazarus Bugfix Release 4...
by
calebs
[
Today
at 10:37:53 pm]
make cycle fails on macOS...
by
Thausand
[
Today
at 10:05:00 pm]
Matching video to form
by
Thausand
[
Today
at 09:48:04 pm]
[Solved] Need help with c...
by
Thausand
[
Today
at 08:03:53 pm]
TTagEdit Component 1.2
by
JD
[
Today
at 08:02:41 pm]
[SOLVED] progress dialog ...
by
cdbc
[
Today
at 07:55:29 pm]
[SOLVED] Form OnTop not w...
by
Pe3s
[
Today
at 07:32:12 pm]
Save record to BLOB Field
by
Sc0li0sis
[
Today
at 07:31:24 pm]
$ifdef highlighting
by
440bx
[
Today
at 07:09:02 pm]
Clipboard Formats
by
AlexTP
[
Today
at 04:39:19 pm]
[BUG REPORT] Code explore...
by
Martin_fr
[
Today
at 02:54:20 pm]
Qt6 / X11: problem with G...
by
paweld
[
Today
at 02:44:07 pm]
Dumb Problems Contest!
by
Thaddy
[
Today
at 02:41:59 pm]
Please ask about the valu...
by
zzzzzzz7
[
Today
at 02:14:52 pm]
laz_xmlstreaming.pas fail...
by
Ryan J
[
Today
at 01:00:52 pm]
Probleme installing Lazar...
by
DonAlfredo
[
Today
at 09:05:41 am]
Wikipedia pollution
by
Thaddy
[
Today
at 08:31:35 am]
How to register a windows...
by
Thaddy
[
Today
at 08:24:15 am]
append new record to arra...
by
speter
[
Today
at 12:46:02 am]
Corrupted strings
by
Aruna
[December 06, 2025, 08:25:44 pm]
Lazarus Trunc & macOS Tah...
by
Thaddy
[December 06, 2025, 05:00:57 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: CheckGroup selection (Read 768 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: 747
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