Sign in to follow this  
Followers 0
raghuramkk

Input Functions

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Thanks a lot for the quick reply. I discovered AutoIT pretty recently and was playing around it before going on to make some thing useful and better.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0