Ask the user to enter Text

Xojo. Ask the user to set a text

I need to change some text value and to do so, I want to use the feature which seems to be the best to achieve that goal.

BTW: on a X-Platform basis, of course (Linux, OS X and Windows). I do not know if that function exists on all platforms (neither how to do it).

Someone ?

PS: I only need the String part (Field called “Nom”), “Tags” and Mass Storage Location / Locked CheckBox are useless in my context.

Not knowing the name of what you want is a real handicap.
Also: yes, I know, Xojo (IDE) use it too and it seems to be a great technology.

See textField.cueText.
Is that what you want?

Cuetext sounds like the right thing.
But for what did you show the image above?
Do you want to make such a popover?

[quote=114477:@Emile Schwarz]Xojo. Ask the user to set a text

I need to change some text value and to do so, I want to use the feature which seems to be the best to achieve that goal.

BTW: on a X-Platform basis, of course (Linux, OS X and Windows). I do not know if that function exists on all platforms (neither how to do it).

Someone ?

PS: I only need the String part (Field called “Nom”), “Tags” and Mass Storage Location / Locked CheckBox are useless in my context.

Not knowing the name of what you want is a real handicap.
Also: yes, I know, Xojo (IDE) use it too and it seems to be a great technology.[/quote]

It looks like a popover box. Do you get to that dialog with right click ? Is that what you want to do ?

Or do you simply want a box where the user enters the name of the file, as you say you don’t need the tags and Emplacement ?

You mention you do not know the name of what you want to obtain. Would you have the name in French terminology ?

I don’t think he wants a file but just some general text entered, so wants to ask the user to enter the text.

The picture is just an example of a similar functionality.

It is basically about how to transfer info from one window to another. Hint: pass ByRef.

No time at the moment but will get back to you tomorrow if nobody answers before.

Made a little example

https://dl.dropboxusercontent.com/u/992591/Xojo/Forum/AskUserForText.rbp.zip

Not perfect but should work fine.

You might also have a look at

https://forum.xojo.com/3922-popovers/0#p27205

and

https://forum.xojo.com/7533-popovers-my-solution

Thank you Markus, all for your answers.

I think Markus get the thing.

The screen shot comes from TextEdit (Preview have it too) and allows to type a file name / Tag / Location to save the window contents as file.

I want to use this (if possible) to ask the user for specific text in one of my projects.

Now, I will read / check what Markus gaves.

[quote=114639:@Michel Bujardet]It looks like a popover box. Do you get to that dialog with right click ? Is that what you want to do ?

Or do you simply want a box where the user enters the name of the file, as you say you don’t need the tags and Emplacement ?

You mention you do not know the name of what you want to obtain. Would you have the name in French terminology ?[/quote]
Thank you Michel,

No, I do not even know the French name (and if this works too under Windows).

I discovered it by pure hazard using Preview (Aperu) and checked to see if TextEdit (from Apple) have it too (it have it too) before sending the question.

Of course, I saw that (first) in the Xojo IDE.

Example: imagine the app starting and he wants to ask the user for his name.

It is way easy to use google when you have the name of what you are searching. I found dates as far as 2006…

Java, FileMaker…

I even saw:

[quote]PopOver.html is a HTML type of file associated to Microsoft Windows developped by Microsoft Corporation for the OS…[quote]
[fast translation]

Popover should work very nicely - look at the second link I posted.

A password ?

I want to use it to ask a string to rename some text…

Popover should work very nicely - look at the second link I posted.
I am.

I think you found what I wanted (and nearly how I want to use it).

A nice alternative to Question Label / TextField answer…

VB calls that an InputBox :

I’m late on that one.

No, I was thinking at what is used in Xojo’s IDE (PopOver they call it).

[quote=115318:@Emile Schwarz]I’m late on that one.

No, I was thinking at what is used in Xojo’s IDE (PopOver they call it).[/quote]

Oh, you mean like when you click on the pencil at the lower right corner or an TextField and you get a box saying “Set TextField Text” ?

Bill Gookin has devised a very good cross platform solution. See https://forum.xojo.com/7533-popovers-my-solution

No, the one you click on that is - for example - on the bottom-right of a TextArea / TextField.

On OS X, TextAEdit or Preview (Aperu) click in the title bar, title string and you will get the screen shot I provided at the top of this conversation (similar to what we can see in Xojos IDE.

In the mean time, I provided two Labels + two TextFields to ask and get that information (one set of Label / TextEdit to present the current string to rename and the other to get the new name).

It is boring to use that (when you are testing, you have to do that so many times !), but at application standard run time, it is a simple way to change names (strings) and a good addition (you do not have to load the text file and make the changes there, then go back to the software to load / display the file text in a ListBox.

The less things have to be done in another software or manually, the better the user feel (and the better the explanationin the users manual will be, I hope).
Thank you,

Emile

You could do

[code]#if debugbuild then

// do nothing

#Else

// ask for string

#endif[/code]

Emile, Lower right and bottom right means the same thing :wink:

Look at Bill Gookin method for popover. I tried it and it works quite well on both Mac OS X and Windows.

There was another thread about popovers in the past.
Maybe this one has a solution you can use.
Popovers