Sorry Im starting with PureBasic and suffering a lot these first days...
Could you tell me where I can get help about the following topics:?
- PB constants : the meaning, how to use them
- PB events
Please I have in mind to develop multiplatform applications, take me in that direction.
Thanks
Here is where Im stucked:
I have a 2 columns ListIcon, the first is a checkbox Type, second is a normal one
I have a counter about how many rows are selected... no problem here...
But I want to detect the nameof the second column when user click on it:
- if I click in the second column where the first one is selected..... I dont get the text
- The counter moves down when I select a row next the checkbox or in the 2 column
- If I click on 2 column and the first is NO select.... works OK
I tested with all the PB_ events but nothing work......
Here is the part of code:
#li_filesToCheck .... listIcon 2 columns
#st_filesToProcess .... counter (checked columns)
Code: Select all
Procedure.l numberOfCheckedElements(Gadget)
numItemsChecked.l = 0
For r=0 To CountGadgetItems(Gadget) - 1
Result = GetGadgetItemState(Gadget, r)
If Result = #PB_ListIcon_Checked
numItemsChecked = numItemsChecked + 1
EndIf
Next
ProcedureReturn numItemsChecked
EndProcedure
Procedure.s SelectedElement(Gadget)
EndProcedure
IF GadgetID = #li_filesToCheck
If EventType = #PB_EventType_LeftClick
numItemsChecked.l = numberOfCheckedElements(#li_filesToCheck)
SetGadgetText(#st_filesToProcess, Str(numItemsChecked))
ElseIf EventType = #PB_EventType_LeftDoubleClick
; selected element
For r=0 To CountGadgetItems(#li_filesToCheck) - 1
Result = GetGadgetItemState(#li_filesToCheck, r)
If Result = #PB_ListIcon_Selected
MessageRequester("resul", GetGadgetItemText(#li_filesToCheck,r,1), #PB_MessageRequester_Ok)
EndIf
Next
EndIf
EndIF


