March 28, 2024, 06:42:28 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


@CTMULTIEDIT?

Started by Columbo, August 20, 2014, 09:12:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Columbo

Looking at a couple of example IWBasic programs I noticed the use of @CTMULTIEDIT and also @CTMULTIAUTOH.  I looked for these in the Language Reference and could not find them. What do these do?

Thanks

LarryMc

Can you tell me what files you found those two constants in?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Columbo

It is in AdrianFox's 'Simple To Do Program'. 

Some of the code goes like this:


REM THE @CTEDITMULTI IS CRUCIAL HERE TO GET SETCONTROLNOTIFY TO WORK WITH ENTER KEY
CONTROL d1,@EDIT,"",21,15,600,30,@CTEDITMULTI|@TABSTOP |@CTEDITRETURN|@CTEDITAUTOH,EDIT_1 '1
CONTROL d1,@EDIT,"",21,45,600,30,@CTEDITMULTI|@TABSTOP |@CTEDITRETURN|@CTEDITAUTOH,EDIT_2 '2


I am looking at various code to try to get familiar with how IWB programs work.

Thanks

LarryMc

Quote from: Columbo on August 20, 2014, 05:07:33 PM
It is in AdrianFox's 'Simple To Do Program'. 

Some of the code goes like this:


REM THE @CTEDITMULTI IS CRUCIAL HERE TO GET SETCONTROLNOTIFY TO WORK WITH ENTER KEY
CONTROL d1,@EDIT,"",21,15,600,30,@CTEDITMULTI|@TABSTOP |@CTEDITRETURN|@CTEDITAUTOH,EDIT_1 '1
CONTROL d1,@EDIT,"",21,45,600,30,@CTEDITMULTI|@TABSTOP |@CTEDITRETURN|@CTEDITAUTOH,EDIT_2 '2


I am looking at various code to try to get familiar with how IWB programs work.

Thanks

You're just trying to confuse an old man, aren't you? ;D

In the quote of Adrian's code you are showing me @CTEDITMULTI and @CTEDITAUTOH
But in your original question you were asking about @CTMULTIEDIT and also @CTMULTIAUTOH

In reference to Adrian's code he is using predefined constants that are found in the usersguide under
Windows Programming => Controls => Using edit controls
and are described as

@CTEDITMULTI
Designates a multiline edit control. The default is single-line edit control. When the multiline edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the @CTEDITRETURN style. When the multiline edit control is not in a dialog box and the @CTEDITAUTOV style is specified, the edit control shows as many lines as possible and scrolls vertically when the user presses the ENTER key. If you do not specify @CTEDITAUTOV, the edit control shows as many lines as possible and beeps if the user presses the ENTER key when no more lines can be displayed. If you specify the @CTEDITAUTOH style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control. To start a new line, the user must press the ENTER key. If you do not specify @CTEDITAUTOH, the control automatically wraps words to the beginning of the next line when necessary. A new line is also started if the user presses the ENTER key. The window size determines the position of the word wrap. If the window size changes, the word wrapping position changes and the text is redisplayed. Multiline edit controls can have scroll bars. An edit control with scroll bars processes its own scroll bar messages. Note that edit controls without scroll bars scroll as described in the previous paragraphs and process any scroll messages sent by the parent window.


@CTEDITAUTOH
Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.


Your original question concerned @CTMULTIEDIT and @CTMULTIAUTOH
The reason why I asked you were you found them was because I couldn't find them anywhere.
But, because I didn't find them it didn't mean they didn't exist in some application somewhere..

IWBasic comes with an extensive list of predefined constants; both for style flags and notification messages.  These predefined constants are mostly Windows API constants that have been renamed.  A few are unique to the internal workings of IWBasic.

IWBasic allows you to define your own constants if you want to or need to(in the case of windows api constant that hasn't been given an IWBasic name)
You could have very well been looking at a source file that contained these two lines of code
SETID "CTMULTIEDIT", 258
SETID "CTMULTIAUTOH", 369

which allows you to use those to constants as
@CTMULTIEDIT and @CTMULTIAUTOH

Hope that helps you to understand better; if not ask me a different way and I'll try again.

BTW, @CTEDITMULTI and @CTEDITAUTOH do show up in the userguide search results.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Columbo

WOW!  A very definitive answer Larry. Much appreciated and sorry for the misspelling of the predefined constants.  My brain must have jumped into reverse mode or something, although at my age everything is starting to go into reverse mode.  :)  (Age=72).

Thank you for the very detailed explanation.


LarryMc

I know how that goes. :D  Next birthday I'll be 70. ::)
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library