April 23, 2024, 10:36:50 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Checked Listbox

Started by ckoehn, March 08, 2010, 01:53:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ckoehn

Is it possible to have a checked listbox?

Later,
Clint

billhsln

Yes.

' Set Flag on
SetCheckState(d1,lv,lvi,1)
' Set Flag off
SetCheckState(d1,lv,lvi,0)

...

SUB SetCheckState(win:DIALOG,cid:Int,index:Int,ticked:Int)
   DEF litem:LVITEM
   litem.mask=LVIF_STATE
   IF ticked THEN ticked = 0x2000 ELSE ticked = 0x1000
   litem.state=ticked
   litem.stateMask=LVIS_STATEIMAGEMASK
   SENDMESSAGE(win,LVM_SETITEMSTATE,index,litem,cid)
   RETURN
ENDSUB


Hope this helps.

Bill
When all else fails, get a bigger hammer.

ckoehn

I know this is an old thread.  But my question is the same.

Is it possible to have a checked listbox using a window?

I get an "Error: Unknown type LVITEM".

Later,
Clint

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ckoehn

Yes, I'm like you, I always use it.

I finally got it to compile with no error but I never did get the checked list box to work.

Later,
Clint

LarryMc

Found an old program by the late Steve Boothman that should answer your questions.

If you are using Fletchie's ctl.inc in your program you will need to rename the two con... routines in this program.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library