Skip to main content

Copy and paste into a edit text box

Hello everybody,
 
I've been working on a macro that allow users to import a database using a ODBC connection. The last step I want to implement is allowing the user to type a Select Query in the text edit box en use that query with the clien.importODBC function. The query works and so does the ODBC connection, however in Query language you might want to use a ENTER every now and then to clean up the code a bit.
As a Example:
Select * from Tablename
where  column = "IDEAScripting.com Example"
 
This query will work, however I cant copy paste it into a edit box because the edit box doesn't allow enters. It will only show "Select * from Tablename".
I think it might have something to do with the DIV style of the editbox but I simply can't find any documentation from IDEA about what styles they have.
 
If someone knows if this is possible or knows the style code I am looking for, I would love to hear it ;)
 
With kind regards
Ivo

IGunique Fri, 10/05/2018 - 09:36

No it doesn't allow any enters not shift+ Enter nothing.I started trying different DIV styles but haven't found 1 that does allow enters. Div style 4 does allow copy pasting but if the amount of rows is bigger than the textbox, I wont do anything at all.

Brian Element Fri, 10/05/2018 - 09:40

In reply to by IGunique

Try entering 4096 in the style option.  I think this is the number that allows Enters to be returned.  Unfortunately I don't have the documentation to look it up right now so if that is not it let me know and I will look it up tonight.

Brian Element Fri, 10/05/2018 - 18:27

In reply to by IGunique

Ok, so the 4096 is correct but you also have to include the 4 as this allows the text box to be multiline and you should also add 64 that adds vertical scrolling (128 for horizontal scrolling).  So your style should look something like 4 + 64 + 4096 and that should get your working.

Brian

IGunique Sat, 10/06/2018 - 08:40

In reply to by Brian Element

Hey Brain
 
4+64+4096 did exactly the trick! Bit strange that it is so hard to find anything about this but thank you for the help again!
 
With kind regards
Ivo

Brian Element Mon, 10/08/2018 - 05:52

In reply to by IGunique

Hi Ivo,

This has always been a secret.  I finally found some information on it about a year or so ago after years of searching.  I am in the process of creating a series of videos on creating dialogs and I will have a video on this topic.

Brian

IGunique Mon, 10/08/2018 - 06:06

In reply to by Brian Element

Hey Brian,
 
That sounds really helpfull. I'm a student, studying ICT with a specialization on database/datawarehouse/data analyses and machine learning. I've used a lot of different programming tools and I must say that the community (except for this site) is so little on IDEAScripting and the library of IDEA is really driving me crazy. The fact that they say arrays can not be dynamic in there documentation while they can be dynamic just makes me angry. If it wasn't for you demo video on using dialogs and this forum it would be impossible to make a good working macro.
 
Ivo

The website encountered an unexpected error. Try again later.