Recent

Author Topic: TBookMarks how to Toggle all T/F  (Read 342 times)

What I can do

  • Full Member
  • ***
  • Posts: 127
TBookMarks how to Toggle all T/F
« on: November 08, 2024, 10:08:37 pm »
Lazarus:3.4
OS:Windows10 @64
Project: click on DBGrid title of the Bookmark "RecList" all on or off as per toggle

I have found a Loop counter but I don't know how to toggle without the CurrentRowSelected
OK so how do I select the row in each completion of the loop.
need an example, link, or shared wisdom.
thanks in advance

Code: Pascal  [Select][+][-]
  1.   if Column.Index=0
  2.     then
  3.       for r:=0 to RecList.Count-1 do
  4.        begin
  5.        // RecList.Items[x]  don't know what to do here
  6.        end;
  7.  

jamie

  • Hero Member
  • *****
  • Posts: 6791
Re: TBookMarks how to Toggle all T/F
« Reply #1 on: November 08, 2024, 11:46:40 pm »
I am not much of a Data base person, however, looking at the HELP file and some code frags, you must be talking about the TYPE TBookMark which is an item in a TBookMarkList.

Each item in the List is a  TBookMark = Tbytes = Array of Bytes.

So basically, you treat each item from the ITEMS list as an array of bytes which is dynamic of course and adherer's to
the standards of managed types, LENGTH, Low, High etc.,

Did that help you any?
The only true wisdom is knowing you know nothing

What I can do

  • Full Member
  • ***
  • Posts: 127
Re: TBookMarks how to Toggle all T/F
« Reply #2 on: November 09, 2024, 02:14:30 pm »
Maybe I am not clear because I don't understand how to set and unset the DBgrid checkbox for the BookMarkList as a none field column.
Everything works great for a single click toggle on a single row but how do i set this without the DBGrid2UserCheckboxState
I would like to click once and toggle the entire column of record count to TRUE
« Last Edit: November 09, 2024, 02:19:26 pm by What I can do »

 

TinyPortal © 2005-2018