Combo box

voskouee

New Member
I just started working with Progress and i have in front of me a handbook that is not so much help to me..
1. where can i get a more usefull guide or handbook with good examples?
2. how can i bring records from a table into a combo box?

please i have no idea how to proceed...

thanks in advance....
 

Patrickorigo

New Member
/* first you emty it, you can use it in runtime or load it in local-initialize*/

cb_box:LIST-ITEM = "".

/* then you select your data from table */
FOR EACH <TABLE> NO-LOCK
WHERE .... [expression]
BY [expression]:

cb_box:ADD-LAST([field1]).

END.

/* ***************************** */

/* if you have List-Items-Pairs */

cb_box:LIST-ITEM-PAIRS = ",".

/* then you select your data from somem table */
FOR EACH <TABLE> NO-LOCK
WHERE .... [expression]
BY [expression]:

cb_box:ADD-LAST([field1],[field2]).

END.
 

voskouee

New Member
Thank you so much for your reply...

can i ask you where i can learn to write code like this?
the manuals of progress suggest other methods..

can you guide me to a good manual that you are using?

I would appreciate your help!

thanks in advance...
 

doreynie

Member
The same goes for me : I learned progress the hard way, with lots of help of collegues, who on their turn learned it the hard way.

Following a course at progress education center is also a good start. There you can ask the questions as they arise.
 

voskouee

New Member
Thanks so much for the help.

so looking at your code below. i try to declare the combo box but i have a problem.

how would you declare it as a variable?


/* first you emty it, you can use it in runtime or load it in local-initialize*/

cb_box:LIST-ITEM = "".

/* then you select your data from table */
FOR EACH <TABLE> NO-LOCK
WHERE .... [expression]
BY [expression]:

cb_box:ADD-LAST([field1]).

END.

/* ***************************** */

/* if you have List-Items-Pairs */

cb_box:LIST-ITEM-PAIRS = ",".

/* then you select your data from somem table */
FOR EACH <TABLE> NO-LOCK
WHERE .... [expression]
BY [expression]:

cb_box:ADD-LAST([field1],[field2]).

END.
 

Patrickorigo

New Member
You find the combo-box among the Icons in the AppBuilder. Drag it to the window you are working with and rename it to a suitable name. If you like you can then attach it to a database field.
/Patrick
 

voskouee

New Member
well am using Progress version 7 and there is no application builder. am wirting code in the text editor. how about that?


You find the combo-box among the Icons in the AppBuilder. Drag it to the window you are working with and rename it to a suitable name. If you like you can then attach it to a database field.
/Patrick
 

doreynie

Member
DEFINE VARIABLE cMyComboBox AS CHARACTER NO-UNDO VIEW-AS COMBO-BOX.
DEFINE FRAME a
cMyCombobox
WITH CENTERED WIDTH 35
.
FOR EACH _File NO-LOCK
WHERE (NOT _file._File-Name BEGINS "_") :
cMyComboBox:ADD-FIRST(_file._File-Name) IN FRAME a.
END.
ASSIGN
cMyCombobox:WIDTH-CHARS = 25
cMyCombobox:INNER-LINES = 10.
VIEW FRAME a.
ENABLE ALL WITH FRAME a.

WAIT-FOR CLOSE OF THIS-PROCEDURE.
 
Top