![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
Deech
Moderator Group
Moderator -- GUI Development Joined: December 15 2003 Status: Offline Points: 177 |
Post Options
Thanks(0)
Quote Reply
Topic: Combo Box QuestionPosted: 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 |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Deech
Moderator Group
Moderator -- GUI Development Joined: December 15 2003 Status: Offline Points: 177 |
Post Options
Thanks(0)
Quote Reply
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!!
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
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 |