Jump to content

Input Functions


Recommended Posts

I have seen that the Edit Box has a list of functions but I am not able to use it as it is a multiline input box and the scroller in the end loos sad. Is there a way to limit the number of chars for the Input Box. Also was checking if it is possible to have a read only edit box which would display day but would not be editable.

Thanks in advance.

Raghu

Link to comment
Share on other sites

  • Moderators

raghuramkk,

Welcome to the AutoIt forum. ;)

I have seen that the Edit Box has a list of functions but I am not able to use it as it is a multiline input box

I am afraid I do not understand this first part of your question. :blink: If you want user input, you would normally use an Input control (which is a forced single-line Edit control). If you want multi-line input, you have to use an Edit control.

the scroller in the end loos sad

If you want an Edit control without scrollbars, then create your Edit without the scroll styles like this:

$hEdit = GUICtrlCreateEdit("", 10, 10, 400, 400, $ES_WANTRETURN)

Is there a way to limit the number of chars for the Input Box

No, you can only set the limit for controls you create yourself by using GUICtrlSetLimit like this:

$hEdit = GUICtrlCreateEdit("", 10, 10, 400, 400, $ES_WANTRETURN)
GUICtrlSetLimit($hEdit, 25)

or this

$hInput = GUICtrlCreateInput("", 10, 10, 400, 20)
GUICtrlSetLimit($hInput, 25)

possible to have a read only edit box which would display day but would not be editable

Use the $ES_READONLY style:

$hEdit = GUICtrlCreateEdit("You cannot edit me", 10, 10, 400, 400, $ES_READONLY)

But if all you want to is to display a date, then a label might be better suited.

Please ask if you have any questions or if I have completely misunderstood what you wanted. :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi Melba.

Thx for your quick reply. I was just trying to figure out if there was a .au3 file like edit has which had to be included to make the field read-only and set limit on the input length.

I was just trying to create a telephone directory with create and read/ edit modes (will have a group with radio buttons. Based on selection it will open up a new screen and hide main screen) which is the basic thing to create and still explore all the features which a language can provide.

For read mode I wanted to display data but keep it un-editable so thought a read-only input field could do the job.

I am trying out now with the DB access. Will come back in case of any doubts. If it is working successfully i will post it as an attachment in the forum.

Thanks

Raghu

Edited by raghuramkk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...