Skip to main content

After showing the changed contents of a LISTBOX using

          REFRESH-OBJECT LB-MYLIST

 I need to show that a certain row is the default value (selected item) To make this I use

            SET-LIST-ITEM-STATE LB-MYLIST 1 1

 After executing this statement the row appears in blue. This looks quite good and is what I need.

But also the condition    ITEM-SELECTED    associated with the LB is activated.

How can I avoid that, because ITEM-SELECTED (and ITEM-ACCEPTED) shall only be executed if the operator really selects an item with the mouse and not by the SET-LIST-ITEM

Is using a different value than 1 in     SET-LIST-ITEM-STATE    a solution?  Which value must I use in order to only highligh the row?

Thanks for any help.    Rolf


#LISTBOXDIALOG-SYSTEM

After showing the changed contents of a LISTBOX using

          REFRESH-OBJECT LB-MYLIST

 I need to show that a certain row is the default value (selected item) To make this I use

            SET-LIST-ITEM-STATE LB-MYLIST 1 1

 After executing this statement the row appears in blue. This looks quite good and is what I need.

But also the condition    ITEM-SELECTED    associated with the LB is activated.

How can I avoid that, because ITEM-SELECTED (and ITEM-ACCEPTED) shall only be executed if the operator really selects an item with the mouse and not by the SET-LIST-ITEM

Is using a different value than 1 in     SET-LIST-ITEM-STATE    a solution?  Which value must I use in order to only highligh the row?

Thanks for any help.    Rolf


#LISTBOXDIALOG-SYSTEM

Rolf,

you can use subclass-control like this:

Global Dialog Definition:

  SUBCLASS-CONTROL

    CALLOUT "SC" 0 CONFIG-VALUE

USER-EVENT

    IF= $EVENT-DATA 34601 CUR-UP

    IF= $EVENT-DATA 50001 CUR-DOWN

  CUR-UP

    MOVE "CU" WORKID *> set the Tab-Index

    RETC

    MOVE TAB-IX $EVENT-DATA

    SET-LIST-ITEM-STATE LB-lisbox 1 $EVENT-DATA

    .

    .

SC is a small Program compiled as a DLL.

Give me your email-address and I send it to you. my address is( info@gjsoft.de)

Regards,

Georg


After showing the changed contents of a LISTBOX using

          REFRESH-OBJECT LB-MYLIST

 I need to show that a certain row is the default value (selected item) To make this I use

            SET-LIST-ITEM-STATE LB-MYLIST 1 1

 After executing this statement the row appears in blue. This looks quite good and is what I need.

But also the condition    ITEM-SELECTED    associated with the LB is activated.

How can I avoid that, because ITEM-SELECTED (and ITEM-ACCEPTED) shall only be executed if the operator really selects an item with the mouse and not by the SET-LIST-ITEM

Is using a different value than 1 in     SET-LIST-ITEM-STATE    a solution?  Which value must I use in order to only highligh the row?

Thanks for any help.    Rolf


#LISTBOXDIALOG-SYSTEM

I think that you have to return to the cobol to make

REFRESH-OBJECT LB-MYLIST and

SET-LIST-ITEM-STATE LB-MYLIST 1 1

via VOCABULARY.

 

After this you do MOVE "PRC-ITEM-LBMYLIST-SELECTED" TO DS-PROCEDURE.

 

You need to recode the ITEM-SELECTED moving his code to PRC-ITEM-LBMYLIST-SELECTED and doing BRANCH-TO-PROCEDURE PRC-ITEM-LBMYLIST-SELECTED, ofcourse.

 

I think.

  _______                          

 /ajSauro\\                          

|         `-------------------.  

|  /"""\\   Antonio João       |  

| ( o o )  ajsauro@gmail.com  |  

|  \\(_)/   Primavera do Leste |  

|   \\-/    Mato Grosso        |  

|   /V\\    Brasil             |  

| Pagode, nem morto!          |  

 `----------------------------´


#LISTBOXDIALOG-SYSTEM