Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - How do you initialize the list box check boxes
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedHow do you initialize the list box check boxes

 Post Reply Post Reply
Author
Message
jgold View Drop Down
Moderator Group
Moderator Group

Moderator

Joined: December 29 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote jgold Quote  Post ReplyReply Direct Link To This Post Topic: How do you initialize the list box check boxes
    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.
Back to Top
Shrek59 View Drop Down
Senior Member
Senior Member


Joined: December 04 2006
Location: New Zealand
Status: Offline
Points: 208
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shrek59 Quote  Post ReplyReply Direct Link To This Post Posted: August 17 2017 at 8:11pm
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

Back to Top
jgold View Drop Down
Moderator Group
Moderator Group

Moderator

Joined: December 29 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote jgold Quote  Post ReplyReply Direct Link To This Post Posted: August 18 2017 at 3:50pm
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.