[request] inputText() should have more options --- fixed 1.1.1 2016-07-04

Bug #1597639 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

Hi!

Could it be possible to bring some custumisation options to inputText(), that is a rather useful feature in Sikuli? Currently it has such disadvantages: very small text in the message as well as user's input text, no scrolling and no text line breaking to be visible in the box. I know this is a "notepad in Sikuli" :) but what if it is easy to bring such options?

I got acquainted with https://answers.launchpad.net/sikuli/+question/240592 similar question, but those solution is not as suitable as oneline inputtext() in small scripts and for beginners.

Well, the text should be a bit larger in the inputtext() at least. Other options might be less important currently.

Revision history for this message
RaiMan (raimund-hocke) wrote :

I will have a look, what I can do short-term

Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.1
RaiMan (raimund-hocke)
summary: - [request] inputText() should have more options
+ [request] inputText() should have more options --- fixed 1.1.1
+ 2016-07-03
Changed in sikuli:
status: In Progress → Fix Committed
importance: Medium → Critical
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [request] inputText() should have more options --- fixed 1.1.1 2016-07-03

This is now possible: (not yet in the docs)

# selects a monospaced font
# default is False meaning a SansSerif font
Settings.InputFontMono = True

# default fontsize now is 14 (also minimum size)
Settings.InputFontSize = 20

print inputText("please tell a story")
# default 20 characters per line and 9 lines

# the textarea now has auto-linewrap at word boundary and a scrollbar if needed

print inputText("please tell a story", 50, 20)
# 50 characters per line and 20 lines

Revision history for this message
RaiMan (raimund-hocke) wrote :

also in the docs now

Revision history for this message
Alex Lunyov (lunyov-av) wrote :

Dear Raiman, thank a lot for improving user experience in this input tool (and so quick)! I've tested this and found a few problems.

So, this is my test code:

Settings.InputFontSize = 15 # works fine
Settings.InputFontMono = True
a = inputText("Tell your story please!",title="Script request",lines=27,width=18,text="Box for your text.")

It seems lines and width settings have reverse effect on the text box, so we get 27 symbols width and 18 lines height. Also it is not documented how to change message text size. It remains the same, very small. Please, see the attachment.

Revision history for this message
Alex Lunyov (lunyov-av) wrote :

The according test inputText() box

Revision history for this message
RaiMan (raimund-hocke) wrote :

thanks for testing.

- lines, width now in correct sequence
- the text block below the area now in same font

Will be available with tonight's nightly

summary: [request] inputText() should have more options --- fixed 1.1.1
- 2016-07-03
+ 2016-07-04
Revision history for this message
Alex Lunyov (lunyov-av) wrote :

I have tested the build and now it works fine, as expected.

Revision history for this message
RaiMan (raimund-hocke) wrote :

thanks for feedback

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.