Print Page | Close Window

Checklistbox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17245
Printed Date: 12 September 2024 at 4:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Checklistbox
Posted By: microdot
Subject: Checklistbox
Date Posted: 14 September 2010 at 10:57am

Hi !!

I need help for implement checklistbox control in my app.

There are a good example in Codejock web but without source code:
http://www.codejock.com/downloads/samples/controls.asp - http://www.codejock.com/downloads/samples/controls.asp

Can somebody post a little example to how I can do this or their source code? I canīt find nothing about it in the online help of my suite.

Thanks in advance.

 



Replies:
Posted By: jpbro
Date Posted: 14 September 2010 at 1:59pm
Add the CJ ListBox to your form, and change the Style property to xtpListCheckBox.

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: microdot
Date Posted: 14 September 2010 at 3:36pm
Thanks for the reply JBPRO but I have done this .
 
What I need is to fill the checklistbox dinamically and basically know how to check or uncheck the value of box at the same time that I read the records of a table of my database.
 
At this moment I am doing this:
 
dim sLayerName as string, sLayerVisible as boolean
    for I=0 to N-1
        sLayerName = DT.Rows(I)("sLayerName").ToString
        sLayerVisible = DT.Rows(I)("sLayerVisible").ToString
        AxListBox1.AddItem(sLayerName)
        ...
 
This works good for add all the content of my table but I donīt know how do the rest (check or uncheck the value of box depending of "sLayerVisible").


Posted By: Aaron
Date Posted: 16 September 2010 at 9:51am
Hi,
 
Don't know what language you use (seems no VB6.0) but I added what I know
 
    for I=0 to N-1
        sLayerName = DT.Rows(I)("sLayerName").ToString
        sLayerVisible = DT.Rows(I)("sLayerVisible").ToString
        AxListBox1.AddItem(sLayerName)
                AxListBox1.Checked(INDEX_OF_LISTITEM) = True or False                                      (in VB6.0)
                AxListBox1.set_Checked(INDEX_OF_LISTITEM, True or False)                           (in VB.Net/C)
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: microdot
Date Posted: 16 September 2010 at 10:53am

I use VB.NET2010.

Thanks Aaron, this is all I need.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net