populate edit box based on selection

populate edit box based on selection

marlance
Advocate Advocate
862 Views
5 Replies
Message 1 of 6

populate edit box based on selection

marlance
Advocate
Advocate

How to populate edit box based on selection in the list box?
For example,
if 1 and A is selected, edit box must contain 1-A,
if 1 and B is selected, edit box must contain 1-B,
and so on.

0 Likes
863 Views
5 Replies
Replies (5)
Message 2 of 6

ВeekeeCZ
Consultant
Consultant

Maybe THIS Lee Mac's page will help you.

0 Likes
Message 3 of 6

john.uhden
Mentor
Mentor
Are you talking about multiple_select=true from one list box or selections from two list boxes? I haven't looked at the file you posted.

John F. Uhden

0 Likes
Message 4 of 6

scot-65
Advisor
Advisor
You have all the ingredients written to do this.

I'll give you a hint (untested):
(action_tile "list_A" "(populateEditBox)")

where
(defun populateEditBox ()
(set_tile "list_B"
(strcat (nth (atoi (get_tile list_num)) list_num) "-" (nth (atoi (get_tile list_A)) list_A))
)
);end PopulateEditBox

I would suggest adding
(set_tile "list_num" "0")
(set_tile "list_A" "0")
after populating each list box in the initialization section of your code (and in the
subroutine as well).

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 6

marlance
Advocate
Advocate

Hi scot,

 

It followed your instruction but I doesn't show up anything on the edit box

0 Likes
Message 6 of 6

scot-65
Advisor
Advisor
Can you temporary cancel out one line and add "(alert" to see
if the string is being properly built?

;;(set_tile "list_B"
(alert
(strcat (nth (atoi (get_tile list_num)) list_num) "-" (nth (atoi (get_tile list_A)) list_A))
)

Secondly, does each list box have at least one highlighted line?

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes