The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
How do you initialize the list box check boxes |
Post Reply |
Author | |
jgold
Moderator Group Moderator Joined: December 29 2003 Location: United States Status: Offline Points: 48 |
Post Options
Thanks(0)
Posted: August 17 2017 at 2:30pm |
I've got a list box using the Check Boxes style. I'm filling it in with two columns, and ID and description. When I check the checkboxes, the ATGUIGETUPDATES function returns a multi-valued list of the IDs of the lines that are checked.
When I read the data back in, I'm passing the same multi-valued list from the update function but the check boxes are left blank. How do you set the checkbox properties? I've looked at the MDI.GRID.TUTOR example but in that case, the check box was part of the data. With the listbox it's not. Like I mentioned, I'm passing in the ID and description and the listbox is putting the check boxes on there. Some GUIdance wouldd be helpful. |
|
Shrek59
Senior Member Joined: December 04 2006 Location: New Zealand Status: Offline Points: 208 |
Post Options
Thanks(0)
|
Try this:
ITEMS.CHECKED = CONVERT(',', @VM, '1,3,4,6') CALL ATGUILOADVALUES(GUIAPP, GUIFRM, 'LISTNAME', ITEMS.CHECKED, GUIERRORS, GUISTATE) This should check the first, third, fourth, and sixth items in the list. You can load multiple controls at once by using @AM delimited lists of controls and control values. HTH Brian |
|
jgold
Moderator Group Moderator Joined: December 29 2003 Location: United States Status: Offline Points: 48 |
Post Options
Thanks(0)
|
Thanks Brian,
I was confused because I was passing in a mutli-valued list of numbers. That's what I was getting as the value from the control but when I was trying to set it, it wasn't working. It turns out it was a typo lower down in the program. The list control was control number 10. Where I was setting the value of control 19 I had accidentally typed 10 instead of 19. That meant that the list control values were actually being passed to control 19 which was also a check box but not a multi-valued one. I didn't notice if it's value was being changed but since I wasn't getting any errors I wasn't catching it. It's working now. Thanks for the help. I appreciate it. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |