Re: List boxes in Microfocus Dialog System/Net Express?

From: James J. Gavan (jjgavan_at_shaw.ca)
Date: 09/10/04


Date: Fri, 10 Sep 2004 17:21:01 GMT

TofuTheGreat wrote:

<Bottom posting>

>I've got a legacy system with all GUI's built with Dialog System. I
>needed to add a "status" field to the client record (pic 9(1) with
>valid values of 1-6). I then added a drop-down listbox to the GUI so
>the users wouldn't be required to remember 6 codes for data entry.
>The listbox shows the acceptable choices for the field (1-Not
>Applicable, 2-In Assessment, 3-Recommended, 4-Not Recommended,
>5-Enrolled, and 6-Not Enrolled).
>
>When the user selects an item from the list I correctly capture the
>item's row number and store it in the client record's status field.
>However when I go back and bring up a client's record I can't get the
>listbox to "jump" to the listbox row that matches the value in the
>record's status field. In other words if the status field holds a
>value of 3 then I want the GUI list box to be positioned to
>"3-Recommended").
>
>I've tried using the SET-LIST-ITEM-STATE (Set a list item state to
>selected or unselected) and SET-TOP-LIST-ITEM (Set a specified
>occurrence of a group data item to be the first visible item of a list
>box) functions when the record is retrieved and the window is
>refreshed. Examples:
>
> SET-LIST-ITEM-STATE CBO-DRUG-COURT 1 MCS-DC-STATUS(1)
> SET-TOP-LIST-ITEM CBO-DRUG-COURT MCS-DC-STATUS(1)
>
>Instead of positioning the listbox to the row that I want a new row is
>always added to the bottom of the list with the text of the row being
>the numeric value of the field. What am I doing wrong? The
>documentation and examples for Dialog System is absolutely ZERO help.
>In fact I've found that Microfocus' documentation just flat sucks.
>
>
If you haven't already, then join M/F's Answer Exchange. Frankly I
doubt there are many Dialog System users who come here.

First a bit picky - but we are talking about ComboBox DropdownList ? I
don't use DS - Dialog Editor and GUIs instead.
Is this what your message above is telling me :-

- display Dropdown List and make selection
- using row-number - they appear in ascending numeric - which is the
same as index-position
- you store row/index number in Client record - then update record
- now you redisplay any Client Record - OK so far ?

- Technically the DropDownList shouldn't show until a Windows event
says you want to make a selection
- So what does show based on what is in your client record is the 'Text
area'" of the DropDownList

- Here's the problem you may be hitting - the 'record' (object) shown
in the 'Text Area" must be *identical* to one of the objects in the
DropDownList, otherwise it *will* get added as a new element to the
Dropdown List. I can get the same problem GUI-ing with OO. I can't be
certain - but that has to be the problem. So :-

Droplist objects :

1-NotApplicable
2-In Assessment
3-Recommended
4-Not Recommended
5-Enrolled
6-Not Enrolled

Any reference to those objects has to be identical to the layout above.
Obviously you just store the number in your Client Record, but when you
do want to display for an existing client then you retrieve one of the
above objects from the DropDownList collection and it is THAT object
which gets displayed in your text area. (Sorry I don't use Dialog System
- so you'll have to somewhat translate above - possibly some reference
to your DataBlock held for the droplist ?).

Am I smart - No ! Got caught on this one myself !!!!!!

Jimmy



Relevant Pages

  • Re: Word form dropdown and Userform listbox
    ... The userform is triggered by a macro on the enter event of the ... listbox once the user clicks on an "OK" command button. ... both the dropdown and textfield have been populated. ... I'd also want a more exact account of what "get the listbox values to filter ...
    (microsoft.public.word.vba.general)
  • Re: Help with creating custom ComboBox
    ... emulating the dropdown on the Pocket PC's File Explorer (background color, ... decorating image to sit beside the text, listbox or tree dropdown, floating ... > the native framework ComboBox, I've attempted a quick and dirty ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Listbox problem
    ... Thankīs a lot Jason! ... > You can send the F4 key to the system to close the dropdown. ... > combobox. ... >> then it setīs focus to my listbox. ...
    (microsoft.public.access.formscoding)
  • Re: Changing the order in dropdown boxes?
    ... I wrote something along the lines - it works but...- could Tom Ogilvy proof ... Listbox with values - up 7 columns squeeze there OK ... Support for ranges up to 14 columns wide, input boxes will appear as ... The form is best invoked by DblClick event on a dropdown. ...
    (microsoft.public.excel.programming)
  • List boxes in Microfocus Dialog System/Net Express?
    ... needed to add a "status" field to the client record with ... The listbox shows the acceptable choices for the field (1-Not ... Instead of positioning the listbox to the row that I want a new row is ... In fact I've found that Microfocus' documentation just flat sucks. ...
    (comp.lang.cobol)