Page 1 of 1

Scrollbar in prompt multiline textboxes

Posted: July 7th, 2020, 3:29 pm
by juanf11
Greetings.

Would it be possible to add a scrollbar to the prompt textbox with the multiline attribute, when the inputted text exceeds the window size?

This greatly limits the input capabilities of a certain field, when you don't want to clutter the screen size with an inmense FIELD (note that this field is in a roster). It would be nice to have the same type of textbox used by 'Edit Note'. In fact, this just gave me a great idea of using something like:

Code: Select all

	putnote string = editnote(FIELD);
	FIELD = getnote($);
	putnote($) = "";
Although going around it in such an unorthodox way is bound to give some trouble later on.

Thoughts?

Re: Scrollbar in prompt multiline textboxes

Posted: July 8th, 2020, 5:03 pm
by aaronw
Not sure I follow. Can you provide a screenshot?

Re: Scrollbar in prompt multiline textboxes

Posted: July 8th, 2020, 6:56 pm
by juanf11
Of course.

Here I'm using the prompt function in an onfocus procedure to fill the field value with the inputted value(s) in the prompt. However as you can see the line limit is 6, and pressing the 'enter' key won't allow any more line breaks to be inserted.

https://imgur.com/a/47o7BLt

And the code used is

Code: Select all

onfocus

	if DTES(curocc()) = "" then
		string texto = prompt("Ingrese los Demandantes, Accionantes, Querellantes o Solicitantes. Una (1) persona por línea","",multiline);
		DTES(curocc()) = maketext("%s",texto);
	endif;

postproc

	if DTES(curocc()) = "" then
		errmsg("No ha colocado ningún texto. Se colocará 'No especifica'.")
		select("Aceptar",continue,"Rechazar",reenter);
		DTES(curocc()) = "No especifica";
	endif;

Re: Scrollbar in prompt multiline textboxes

Posted: July 9th, 2020, 3:37 pm
by aaronw
Oh I got you. Based on the use case for prompt I'm guessing it was assumed 6 lines was more than enough. I can mention it to the team.

Regarding your first post. I think using the notes input is a clever approach. I might do something like this.
preproc

    protect
($, false);
    $ =
editnote();
   
putnote("");
   
protect($, true);
I protect the field, so the cursor is automatically advanced. This way you enter the response and never see the field.