Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - Combo Box Question
  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 LockedCombo Box Question

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

Moderator -- GUI Development

Joined: December 15 2003
Status: Offline
Points: 177
Post Options Post Options   Thanks (0) Thanks(0)   Quote Deech Quote  Post ReplyReply Direct Link To This Post Topic: Combo Box Question
    Posted: December 29 2003 at 8:56pm
Well to start things off on this forum I have the honor of posting the first question.

My question is about the Combo Box control.

I create a dynamic array, CTRLS, with all the names of my controls at the top of the program. I also create a corresponding dynamic array, called VALS, to contain all the values of the controls. I find this to be a useful practice. After I read my record in from the database, I load the values into the VALS array and use ATGUILOADVALUES before the form displays.

My Question is: For a Combo Box, I already know the value of edit part of the control when I read from the database and have assigned it to my values dynamic array using, VALS<X> = FIELD.FROM.DATABASE, my question is, how would I assign the list items to VALS array so when I do my ATGUILOADVALUES both the edit control and the drop down list have values?

Hope someone has some good suggestions on this, or maybe I'll have to hack out the answer for myself and reply to my own post for the benefit of others.

Thanks,

Deech
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: December 30 2003 at 5:28am
Deech -

The combo box has two different properties: Value and Items. Your VALS variable contains the Value part, but not the Items. You need a separate call to ATGUISETPROP to set the GPITEMS property for the list items. List box works similarly: set the Items property first, then set the Value property to the index of the selected item.

Thanks,

Pete
Back to Top
Deech View Drop Down
Moderator Group
Moderator Group

Moderator -- GUI Development

Joined: December 15 2003
Status: Offline
Points: 177
Post Options Post Options   Thanks (0) Thanks(0)   Quote Deech Quote  Post ReplyReply Direct Link To This Post Posted: December 30 2003 at 4:57pm
Pete,

Does this mean that I can't use ATGUILOADVALUES to do it all in one shot? Just curious. I can do it the way you suggested.

Thanks for the help,

Deech
Accuterm GUI--Changing the Face of MV Development!!
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: December 31 2003 at 3:51am
Thats right - ATGUILOADVALUES only loads the Value property of a list of controls. Call ATGUISETPROP to set other properties, like Items, BackColor, etc.

Remember to surround a block of ATGUILOADVALUES and ATGUISETPROP calls within calls to ATGUIBEGINMACRO / ATGUIENDMACRO / ATGUIRUNMACRO for runtime efficiency.

Pete


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.