M MDEnt Member Licensed User Longtime User Apr 7, 2012 #1 Wondering if anyone has any sample code that would show how to require a user to enter text - meaning they cannot proceed if they do not enter something. I am using the Dialogues library to capture text - below is a snippet where text is to be entered. Problem is, if they just hit the OK button and don't actually enter anything - it proceeds anyhow. Code: Copy Dim Id As InputDialog Id.InputType = Id.INPUT_TYPE_TEXT Id.Input = "" Id.Hint = "a color" ret = Id.Show("Some filler text", "Please enter your favorite color.", "OK", "","", LoadBitmap(File.DirAssets, "icon.jpg")) Thanks.
Wondering if anyone has any sample code that would show how to require a user to enter text - meaning they cannot proceed if they do not enter something. I am using the Dialogues library to capture text - below is a snippet where text is to be entered. Problem is, if they just hit the OK button and don't actually enter anything - it proceeds anyhow. Code: Copy Dim Id As InputDialog Id.InputType = Id.INPUT_TYPE_TEXT Id.Input = "" Id.Hint = "a color" ret = Id.Show("Some filler text", "Please enter your favorite color.", "OK", "","", LoadBitmap(File.DirAssets, "icon.jpg")) Thanks.
A admac231 Active Member Licensed User Longtime User Apr 7, 2012 #2 If you put the Id.Show method inside a Do While loop you can check to see if something has been entered: Code: Copy Do While Id.Input = "" ret = Id.Show("Some filler text", "Please enter your favorite color.", "OK", "","", LoadBitmap(File.DirAssets, "icon.jpg")) Loop Upvote 0
If you put the Id.Show method inside a Do While loop you can check to see if something has been entered: Code: Copy Do While Id.Input = "" ret = Id.Show("Some filler text", "Please enter your favorite color.", "OK", "","", LoadBitmap(File.DirAssets, "icon.jpg")) Loop
M MDEnt Member Licensed User Longtime User Apr 7, 2012 #3 TY - I figured some sort of loop would do the trick! Upvote 0