cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

is it possibel to use a List Box output as an input for the same List Box?

Raiko
16-Pearl

is it possibel to use a List Box output as an input for the same List Box?

Hello Folks,

I would like to have a fancy listbox where all the logic is external and the listbox is used merely for choice and display -  such as in the pictest.jpg. Does anybody have an idea?

Raiko

8 REPLIES 8
AndyWesterman
4-Participant
(To:Raiko)

Hi Raiko,

   How do you want the input to affect the listbox?

Will it change the choices offered or the calculation internal to generate the RESULT output?

Do you really want something that is recursive, I think that it should be possible in one form or another, but you will need to define an end-stop condition, otherwise you will generate an infinite loop

Regards

Andy

Hi Andy,

I'd like to choose an item in the list box so that the output variable "out" is given. The input should take the output variable "out" and feed it through an algorithm. The result shall be fed into the listbox and given out via the second output variable "Result" which can be used by other functions.

In this fashion I could use a very basic listbox and use it for display and choice only. From my point of view the option to use a listbox with external algorithm, without the need for an extra control, would be brilliant. it is much more versatile for reuse and VB controls tend to freeze during lenghty programming anyway.

Raiko

Right you are. Do you have any suggestions?

AndyWesterman
4-Participant
(To:Raiko)

How's bout this?

uses a function I found on the forum: writes a value to a defined region.

You need to be careful as it is too easy to create an infinite loop (esc does the trick)

Thank you Andy. However, this is not what I'm looking for. For my convenience I'd like to use a single listbox without other elements. I'm lazy 😉

Raiko

AndyWesterman
4-Participant
(To:Raiko)

Hmm , I'm a little confused. How does this diverge from what you would like to do?

reading through your reply , I also have to ask why does the 'out' value need to pass back through the listbox at all; can't you simply assign the 'result' variable directly?

As I said: I want to have an external algorithm so that it is easier to adapt/change it. For the algorithm I do need some input hence "out" is passed from output to input.

raiko

RichardJ
19-Tanzanite
(To:Raiko)

I also don't understand what you are trying to achieve. You set the value of out. Then the Mathcad algorithm manipulates it. OK so far. But why do then want to pass the result back to the listbox? Do you want it to actually change the behavior of the listbox in some way (for example, change the options listed)?

The question somewhat academic though, because there's no good way to do what you want. It's sort of possible, but with some very undesirable side effects.

Top Tags