B bluedude Well-Known Member Licensed User Longtime User Sep 12, 2019 #1 Hi, How can I disable the ok or cancel button during launch of the dialog?
Erel B4X founder Staff member Licensed User Longtime User Sep 12, 2019 #2 You need to provide more information on what you are trying to do. If you want to validate the data then use the IsValid event. Upvote 0
You need to provide more information on what you are trying to do. If you want to validate the data then use the IsValid event.
B bluedude Well-Known Member Licensed User Longtime User Sep 12, 2019 #3 There is not more information, I just want to disable one of the buttons based on some logic. I understand validation but that's not what I'm referring to. Upvote 0
There is not more information, I just want to disable one of the buttons based on some logic. I understand validation but that's not what I'm referring to.
Erel B4X founder Staff member Licensed User Longtime User Sep 13, 2019 #4 You can pass empty strings to the Show method to remove buttons. Upvote 0
B bluedude Well-Known Member Licensed User Longtime User Sep 13, 2019 #6 Hi, Smal question about IsValid event. I want to do a httpjob to validate. However, this can only work when using Resumablesub in the http sub that I use. This however does not work with the IsValid event because it needs to be a Boolean while B4A asks me to change it to Resumablesub. All should happen when the dialog is open. Otherwise I have to open and close the dialog all the time when a value is not valid. Any suggestions? Upvote 0
Hi, Smal question about IsValid event. I want to do a httpjob to validate. However, this can only work when using Resumablesub in the http sub that I use. This however does not work with the IsValid event because it needs to be a Boolean while B4A asks me to change it to Resumablesub. All should happen when the dialog is open. Otherwise I have to open and close the dialog all the time when a value is not valid. Any suggestions?
DonManfred Expert Licensed User Longtime User Sep 13, 2019 #7 You can return any Value in your resumeable sub. Even a boolean. Resumeable subs that return a value. Code: Sub Button1_Click Wait For(Sum(1, 2)) Complete (Result As Int) Log("result: " & Result) Log("after sum") End Sub Sub Sum(a As Int, b As Int) As ResumableSub Sleep(100) Log(a + b) Return a + b End Sub For ANY other question you should start a new thread. NEVER post multiple question in the same thread. Last edited: Sep 13, 2019 Upvote 0
You can return any Value in your resumeable sub. Even a boolean. Resumeable subs that return a value. Code: Sub Button1_Click Wait For(Sum(1, 2)) Complete (Result As Int) Log("result: " & Result) Log("after sum") End Sub Sub Sum(a As Int, b As Int) As ResumableSub Sleep(100) Log(a + b) Return a + b End Sub For ANY other question you should start a new thread. NEVER post multiple question in the same thread.
B bluedude Well-Known Member Licensed User Longtime User Sep 13, 2019 #8 That's not the issue or question, I understand that. However, the IsValid event cannot be changed/is not supporting ResumableSub it seems. Upvote 0
That's not the issue or question, I understand that. However, the IsValid event cannot be changed/is not supporting ResumableSub it seems.
Erel B4X founder Staff member Licensed User Longtime User Sep 15, 2019 #9 The IsValid event is not called with Wait For so it cannot be a resumable sub. You can use the source code and modify it to be called with Wait For. Upvote 0
The IsValid event is not called with Wait For so it cannot be a resumable sub. You can use the source code and modify it to be called with Wait For.