Sergey_New Well-Known Member Licensed User Longtime User Oct 13, 2025 #1 Please tell me how to hide the OK button when opening a custom dialog with an input field. After entering characters, the OK button should appear. Attachments MyDialog.zip MyDialog.zip 8 KB · Views: 243
Please tell me how to hide the OK button when opening a custom dialog with an input field. After entering characters, the OK button should appear.
Solution V V vinpolins Oct 14, 2025 Here you go In the Sub Show(title As String,message As String,Ok As String,Cancel As String,No As String, icon As Bitmap) As ResumableSub Add this line right after the line "Dialog.ShowCustom": Code: rs = Dialog.ShowCustom(x, Ok, No, Cancel) EditName_TextChanged("", "") And here is the Sub EditName_TextChanged: B4X: Sub EditName_TextChanged (Old As String, New As String) Dim bt As B4XView = Dialog.GetButton(xui.DialogResponse_Positive) bt.Visible = (New.Length > 0) End Sub
Here you go In the Sub Show(title As String,message As String,Ok As String,Cancel As String,No As String, icon As Bitmap) As ResumableSub Add this line right after the line "Dialog.ShowCustom": Code: rs = Dialog.ShowCustom(x, Ok, No, Cancel) EditName_TextChanged("", "") And here is the Sub EditName_TextChanged: B4X: Sub EditName_TextChanged (Old As String, New As String) Dim bt As B4XView = Dialog.GetButton(xui.DialogResponse_Positive) bt.Visible = (New.Length > 0) End Sub
V vinpolins Member Oct 14, 2025 #2 Here you go In the Sub Show(title As String,message As String,Ok As String,Cancel As String,No As String, icon As Bitmap) As ResumableSub Add this line right after the line "Dialog.ShowCustom": Code: rs = Dialog.ShowCustom(x, Ok, No, Cancel) EditName_TextChanged("", "") And here is the Sub EditName_TextChanged: B4X: Sub EditName_TextChanged (Old As String, New As String) Dim bt As B4XView = Dialog.GetButton(xui.DialogResponse_Positive) bt.Visible = (New.Length > 0) End Sub Upvote 0 Solution
Here you go In the Sub Show(title As String,message As String,Ok As String,Cancel As String,No As String, icon As Bitmap) As ResumableSub Add this line right after the line "Dialog.ShowCustom": Code: rs = Dialog.ShowCustom(x, Ok, No, Cancel) EditName_TextChanged("", "") And here is the Sub EditName_TextChanged: B4X: Sub EditName_TextChanged (Old As String, New As String) Dim bt As B4XView = Dialog.GetButton(xui.DialogResponse_Positive) bt.Visible = (New.Length > 0) End Sub
Sergey_New Well-Known Member Licensed User Longtime User Oct 14, 2025 #3 vinpolins said: Here you go Click to expand... Thank you so much! This is exactly what I wanted. Upvote 0