i want to enter multi line of 10 lines with adjustable window width? is it possible to achieve the same with a macro?
i want to read the multi line into a string variable.
i want user input window should come with OK, Cancel buttons and the text entered should be read into a string variable.
Update to EmEditor v20.3 beta 4 (20.2.904), and use this form:
strAnswer = prompt( "message", "default", eePromptMultiline );
Related
I offer the user some options in a menu, when they choose an option I replace the current dialog for them to start the valid dialog for the selected option, but if the user types something that its not in the menu I want to use AI to send them the right option but when I use stepContext.ReplaceDialogAsync the original text from the user is lost. How can I preserve the original text and forward it to the next dialog where the AI can process it?
You can pass it along your replace dialog code
stepContext.ReplaceDialogAsync(nameof(YourDialog),yourText);
And access it on your new dialog by
var result = stepContext.Options as string;
I'm trying to change the way RichEdit20A Windows control selects line so it's similar to how it works in Notepad.
By default, if I select a line (e.g. Shift-End), then all the characters and the end of line is selected:
Sample text
^^^^^^^^^^^^ <- this is the selection
In Notepad it selects just the text:
Sample text
^^^^^^^^^^^
As a result, pressing delete (or backspace) in RichEdit20A control removes the line while in Notepad it just removes the text and keeps the line empty.
Is there any simple way (other than handling selection on my own) to configure the RichEdit20A control to keep formatting but make the line selection to work like in Notepad?
I don't know such a setting to influence the RTF control. But pressing Shift+End is a key input that is possible to trap with a WM_KEYDOWN handler, when you subclass the control.
You can use EM_LINEINDEX with -1 to get the current line start index.
Now with this index you can use EM_LINELENGTH.
Get the current selection (EM_GESTEL) and now you are free to use EM_SETSEL with the values you like to extend it.
Explaining the problem
I am developing an addin in powerpoint and i am trying to create a textbox with justify alignment:
Shape newTextBox = currentSlide.Shapes.AddTextbox(...);
TextRange boxTextRange = newTextBox.TextFrame.TextRange;
textRange.ParagraphFormat.Alignment = PpParagraphAlignment.ppAlignJustify;
The results are not as expected. When i type an 'enter' character in this box, the line is not justified. Why? Because with every 'enter' character, a 'paragraph' character is automatically inserted. Here is a screen shot of the copy-pasted text from the powepoint text-box to a word document:
In every case, the line is considered the last line of the paragraph and it is not justified.
However, if i try to do the same thing on the title textbox in the default title layout slide, there are no 'paragraph' characters.
Question time ...
Is there a way to stop these characters from being automatically entered in the text box? Maybe an option that i can set via code?
Dim ProcessProperties As New ProcessStartInfo()
ProcessProperties.FileName = "notepad.exe"
ProcessProperties.Arguments = "/p c:/doc.txt" 'command line arguments ''
''ProcessProperties.WindowStyle = ProcessWindowStyle.Maximized
Dim myProcess As Process = Process.Start(ProcessProperties)
when printing using the code above i have "doc.txt" printed. I don't want the file name to appear when printing is over
It is not possible to pass an argument through command line to notepad to hide the header, the only parameter accepted for the /P argument is the file name. (See link)
The only way to hide the header from printing is by opening notepad and going to File->Page Setup, and changing the header command. (See link)
If it is really needed to print using a process, you can try searching for third party editing tools which support printing arguments.
Another way is to implement functionality for printing the text file, see this Stackoverflow article (Link)
You will have to configure the header and footer options of Notepad in order to prevent or override the file name appearing on the print page. This can be done by simulating user input to bring up the Page Setup dialog and clear the header and footer.
There are a number of ways to send user input (mouse and/or keyboard). For starters you could look at these two:
Windows Input Simulator
Application and Global Mouse and Keyboard Hooks .Net Libary in C#
Textbox textwrap property is set to wrap.
My scenario is enter the text in textbox from SIP. When cursor reaches almost at the end of line may be 3 or 4 char left for line change just enter space so that it should came to next line. But after pressing space 4 or 5 time or more the cursor will not come to next line moreover it will not shown . It will come to next line when i enter some char.
I think it should came to next line because user may want to enter some space. is this can be fixed.
The other property you need to set on the TextBox is AcceptsReturn to true.