IonicWind Software

IWBasic => GUI Central => Topic started by: ckoehn on March 08, 2010, 01:53:03 PM

Title: Checked Listbox
Post by: ckoehn on March 08, 2010, 01:53:03 PM
Is it possible to have a checked listbox?

Later,
Clint
Title: Re: Checked Listbox
Post by: billhsln on March 08, 2010, 03:02:41 PM
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
Title: Re: Checked Listbox
Post by: ckoehn on October 31, 2015, 10:36:01 AM
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
Title: Re: Checked Listbox
Post by: LarryMc on October 31, 2015, 10:51:58 AM
Are you using sapero's windowssdk.inc file?
Title: Re: Checked Listbox
Post by: ckoehn on November 07, 2015, 11:37:31 AM
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
Title: Re: Checked Listbox
Post by: LarryMc on November 07, 2015, 01:20:47 PM
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.