Clarion mark Tree Queue


#1

Hello
I have simple Queue on window (Tree) and now I need to mark some records (using Ctrl + Click).
Is there some example of how to do that, please?
Thank you.


#2

See “MARK” keyword in the help, but it works not as expected. Usually first column displaying check/uncheck image is better.


#3

Hello Mike
yes I checked Mark but as you said, it does not work :frowning:
I also meant on check/uncheck option on Queue but I don’t know how to implement it.
Do you have some simple example of that, please?


#4

See PROP:IconList, there is an example of handcoded tree with icons and colors.


#5

I see what you mean, thank you for that. Now I have icons on left side of Name field. I suppose now I need to use proplist:mouseDownRow in combination with LISTZONE:Icon to get some value and change icon (if it was 0 I need to set it to 1 and vice-versa? Do you have (maybe) some example for that?


#6

I’d add one extra field to the queue, IsSelected BYTE, to hold selected state then something like this (did not test, just typing here):

case event()
of event:alertkey
  if keycode() = MouseLeft2  !double click
    get(q, choice(?list))
    if not errorcode()
      q:IsSelected = choose(q:IsSelected=false)
      q:IconField = choose(q:IsSelected=false,1,2)  !1-unchecked icon number, 2-checked icon number
      put(q)
      display(?list)
    end
  end

#7

Awesome, thank you so much. It works perfect :grinning:


#8

Actually the above code also should check “if field() = ?list”, otherwise double clicking on any control which processes event:alert will trigger select/unselect action.


#9

Thank you, I have no other alert’s so it is fine, but thanks anyway!