Jump to content
Sign in to follow this  
minipopov

Cursor position on MultiEdit

Recommended Posts

Hello,

 

Goal:

I want create control to execute local script (same as this one you can find when you spawn on mission with EDEN):

 

10ae53bc575d4c919d03a211244f8fca.png

 

Problem:

I use keyboard event to break the line by (shift+enter), but i don't find any function to have the position of cursor. This is my script:

			if (_shift) then {
				private _ctrl = ((findDisplay 10000) displayCtrl 1401);
				if (!isNull _ctrl) then {
					private _s = ctrlText _ctrl;
					_ctrl ctrlSetText (_s + tostring [13,10]);
					ctrlSetFocus _ctrl;
					_noReturn = true;
				};
			};
			if (!_shift) then {
				"OnEnterScript" call Console;
			};

This one "work" but only add new line at the end of string. Is anyone know how to get cursor position in control? Do you know any trick to place the cursor at the end?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×