Scrollbar in prompt multiline textboxes

What would you like to see in CSPro?
Post Reply
juanf11
Posts: 12
Joined: July 7th, 2020, 2:19 pm

Scrollbar in prompt multiline textboxes

Post by juanf11 » July 7th, 2020, 3:29 pm

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?

aaronw
Posts: 452
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Scrollbar in prompt multiline textboxes

Post by aaronw » July 8th, 2020, 5:03 pm

Not sure I follow. Can you provide a screenshot?

juanf11
Posts: 12
Joined: July 7th, 2020, 2:19 pm

Re: Scrollbar in prompt multiline textboxes

Post by juanf11 » July 8th, 2020, 6:56 pm

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;

aaronw
Posts: 452
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Scrollbar in prompt multiline textboxes

Post by aaronw » July 9th, 2020, 3:37 pm

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.

Post Reply