In ListPicker AfterPicking a command set a Textbox invisible or visible, but this is not working

Hello,

In my project, I perform mathematical operations on a number that is the result of previous operations.

The number to be manipulated is in a label, I select the mathematical operation from a listpicker, the number, i.e. the factor by which I multiply, divide, add, or perform other mathematical operations on the number to be manipulated, is in a textbox.

There are mathematical operations performed on two factors (e.g.: -,+,*,/) and on one factor (e.g.: square root, sine, cosine).

In the case of one-factor operations, I want the factor's textbox to be invisible, while in the case of two-factor operations, I want the factor's textbox to be visible.

See the two screenshots attached below; I have cut off the unnecessary parts of the images.

I apologize, I haven't translated the texts into English in my application yet.


The solution to this is shown in the attached images.



However, this solution does not work well; when the factor's textbox already contains a digit, it works when the factor's textbox is empty, then it disappears in the case of a one-factor mathematical operation, but then it does not appear again in the case of a two-factor operation.

Why doesn't it come out?

Any advices will be appreciated!

Because you posted draggable block images, I was able to edit them for two improvements:

P.S. I am guessing as to the component types of the things I am testing for input and for visibility, since I can't read French.

@ABG
Thank you very much! This solution, namely combining the types of mathematical operations into a list, reduces the redundancy in the application.

As for the Is number? block; since it was not clear to you which element is a label and which is a textbox, I will now explain this and also why this block is not needed, namely to check whether the input is a number or not.

The cimke_Eredmenyt_Mutat is a label, while the bevMezo_Tenyezo is a textbox with the property NumbersOnly.

My solution (thanks to you) is shown in the image below:

The cimke_Tenyezo_FejLece is a label, the header of the result in the table layout.
The cimke_UjEredmenyt_Mutat is a label.

I like the Is a Number test for the special case where the user entered just a decimal point.

It's not a blank, it's allowed for a numbers only text box (I'm guessing), but it is not a number.

Prove me wrong?

1 Like

Indeed, you are right!
Therefore, I will use the is number? block for test.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.