How to achieve unlimited text size in Get?

How to achieve unlimited text size in Get?

Postby gkuhnert » Fri Apr 15, 2011 12:45 pm

Hi,

maybe I'm doing something wrong, but the method :LimitText() doesn't work in my example:

Code: Select all  Expand view
#include "FiveWin.ch"

function main()
   local oWnd
   local oGet, cGet := "How to use unlimited length in this get?"

   DEFINE WINDOW oWnd TITLE "Test unlimited Get"
        @  2,1 GET oGet VAR cGet OF oWnd SIZE 300,24 UPDATE
   ACTIVATE WINDOW oWnd ON INIT (oGet:LimitText())

RETURN NIL
 
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: How to achieve unlimited text size in Get?

Postby Enrico Maria Giordano » Fri Apr 15, 2011 1:47 pm

Unlimited text is only for multiline get (GET MEMO).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to achieve unlimited text size in Get?

Postby gkuhnert » Fri Apr 15, 2011 2:08 pm

Enrico,

thanks for your answer. But I wonder for what purpose this method in tget exists then:

Code: Select all  Expand view
  // Call this method to use unlimited text size
   METHOD LimitText() INLINE SendMessage( ::hWnd, EM_LIMITTEXT, 0, 0 )
 
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: How to achieve unlimited text size in Get?

Postby Enrico Maria Giordano » Fri Apr 15, 2011 5:36 pm

No, it isn't. At least in the current FWH release.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to achieve unlimited text size in Get?

Postby nageswaragunupudi » Sat Apr 16, 2011 5:55 am

This is the documentation of EM_LIMITTEXT from MSDN
Specifies the maximum number of characters the user can enter. If this parameter is zero, the text length is set to 0x7FFE (32,766) characters for single-line edit controls or 0xFFFF (65,535) characters for multiline edit controls. If this parameter is not zero, the maximum text length is 0x7FFE characters for single-line edit controls or 0x7FFFFFFE characters for multiline edit controls. These limits differ from the limits for Windows-based desktop platforms.


But in the case of Get in FWH, the (x)Harbour;s GET control limits the text to the length of the variable. Best way to enter longer text in single line GET of (x)Harbour is to Pad the variable with blanks to a large size and then trim the result after get. For obvious reasons, EM_LIMITTEXT is not useful in our environment.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests