EditBox control: increase capacity

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

Hola Eduardo
EduardoLuis wrote: ... again limits appear....
No, no limits but some innovations to learn ;)

Before I must clarify : the goal of my intervention to this topic was for text files and memo fields limits.

Though Increasing EditBox capacity was main subject, your first question was not about that.

Now, your last problem is about this main subject :(

Fortunately our second master Dr. Claudio is a real genius :D

Now you need follow instructions of our doc at the beginning of topic; in summary :

Code: Select all

#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))
and add a "small" #pragma to your program :mrgreen:

Or simply follow my slightly modified sample :
Memo limits and EditBox capacity test results
Memo limits and EditBox capacity test results
MmoLmTst2.JPG (130.37 KiB) Viewed 5730 times
MmoLmTst2.zip
Memo limits and EditBox capacity tests Sources
(136 Bytes) Downloaded 256 times
Viva HMG, viva Roberto Lopez, viva Dr. Claudio Soto :D
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: EditBox control: increase capacity

Post by srvet_claudio »

esgici wrote:Now you need follow instructions of our doc at the beginning of topic; in summary :
Code:
#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))

and add a "small" #pragma to your program
A small suggestion, puts MAXLENGTH to 0 in EditBox control which has the same effect.
Best regards,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

srvet_claudio wrote:...
A small suggestion, puts MAXLENGTH to 0 in EditBox control which has the same effect.
...
This is a typical Windows logic : set maximum limit to overcome the limitation :!:

... and worked :o

In this case, seems MSG_SETTEXT() function is unnecessary furthermore, is this correct ?

By the way can I make a suggestion :

renaming MSG_GETTEXT() and MSG_SETTEXT() functions as GetEditBoxValue() and SetEditBoxValue() be may more convenient ?

In other hand, hopefully you may find other ways ( such as changing internal size limits of HMG ) else you may add this low level ( #pragma ) routine to the core of HMG.

Anyway, immense thanks to your immense participation and invaluable improvement to HMG :D
Viva INTERNATIONAL HMG :D
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: EditBox control: increase capacity

Post by bpd2000 »

esgici wrote:Hola Eduardo
EduardoLuis wrote: ... again limits appear....
No, no limits but some innovations to learn ;)

Before I must clarify : the goal of my intervention to this topic was for text files and memo fields limits.

Though Increasing EditBox capacity was main subject, your first question was not about that.

Now, your last problem is about this main subject :(

Fortunately our second master Dr. Claudio is a real genius :D

Now you need follow instructions of our doc at the beginning of topic; in summary :

Code: Select all

#define EM_LIMITTEXT 197

SendMessage (GetControlHandle("EditBox_1","Form_1"), EM_LIMITTEXT, 0, 0)

MSG_SETTEXT (GetControlHandle("EditBox_1","Form_1"), cHugeText)

cHugeText := MSG_GETTEXT (GetControlHandle("EditBox_1","Form_1"))
and add a "small" #pragma to your program :mrgreen:

Or simply follow my slightly modified sample :

Viva HMG, viva Roberto Lopez, viva Dr. Claudio Soto :D
Sir, this MmoLmTst2.zip attachment has only .hbp file other files are missing
BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

bpd2000 wrote:..., this MmoLmTst2.zip attachment has only .hbp file other files are missing
Sorry friends :oops:

Thank to warn Dave :)

Regards
Attachments
MmoLmTst2.zip
Memo limits and EditBox capacity tests Sources (2)
(2.09 KiB) Downloaded 279 times
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: EditBox control: increase capacity

Post by srvet_claudio »

esgici wrote:In this case, seems MSG_SETTEXT() function is unnecessary furthermore, is this correct ?
Yes, is correct!!!
esgici wrote: By the way can I make a suggestion :

renaming MSG_GETTEXT() and MSG_SETTEXT() functions as GetEditBoxValue() and SetEditBoxValue() be may more convenient ?

In other hand, hopefully you may find other ways ( such as changing internal size limits of HMG ) else you may add this low level ( #pragma ) routine to the core of HMG.

Anyway, immense thanks to your immense participation and invaluable improvement to HMG :D
In the next release, these functions are not necessary because they are part of the internal logic of the TextBox, just use Form.TextBox.Value
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

Thanks doc :D
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

srvet_claudio wrote: Yes, is correct!!!
Well,

this is rectified ( 3rth ) version of test prg
EdBoxSize.JPG
EdBoxSize.JPG (79.67 KiB) Viewed 5674 times
MmoLmTst3.zip
(2.08 KiB) Downloaded 409 times
Enjoy !
Viva INTERNATIONAL HMG :D
EduardoLuis
Posts: 683
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: EditBox control: increase capacity

Post by EduardoLuis »

Hi Esgici, Dr. Soto, Rati, & all HMG Genious members

First i'm sorry not answering you since your saturdays post, but i've no internet at home so i must wait till today to see your powerfull posts.-
I've download your las MmoLmTst.-
First i've seen the code and a cold wind runs behind my neck "UNICODE", because i've lots of problems with it, specially on printing PDF reports.- That's the reason why i perform using 3.14 HMG IDE.-
Then i compile the prg and test and all works really FINE.-
I test very deep, also using DBF / DBT / NTX table format and index, and all was right.-
No ERRORS, No BUGGS.-
I'll implement this excellent routine on my developing.-
THANK YOU TOO MUCH for helping me to grow up on my knowledge of HMG language.-
With regards. Eduardo
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: EditBox control: increase capacity

Post by esgici »

Hola Eduardo

I'm glad by seeing you happy :)

Yes, you are rigth; all we are should a bit more work for Unicode; but I believe it's worth it :)

Viva HMG, viva Roberto Lopez, viva Rathi, viva Dr. Soto and viva all supporters of HMG :D
Viva INTERNATIONAL HMG :D
Post Reply