pixelsearch Posted May 7, 2023 Share Posted May 7, 2023 (edited) @kurtykurtyboy For the record, this works for me : #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGUI = GUICreate("RichEdit Set Tab Stops with \deftabN", 500, 300) Local $hRichEdit = _GUICtrlRichEdit_Create($hGUI, "", 1, 1, 498, 298, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL, $WS_HSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $ES_NOHIDESEL)) Local $sRTFtext = _ '{\rtf1\ansi\ansicpg1252\deff0\deflang1036\deftab416{\fonttbl{\f0\fswiss\fcharset0 Arial;}}' & @crlf & _ '{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\f0\fs20 1234567890123456789012345678901234567890\par' & @crlf & _ 'ab\par' & @crlf & _ '}' _GUICtrlRichEdit_SetText($hRichEdit, $sRTFtext) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($hRichEdit) EndFunc ;==>Example I added \deftab416 (using NotePad) and each Tab Stop corresponds to 4 characters on any line (Font used when creating the RTF with WordPad was Arial 10) Hope it will work for you too Edited May 7, 2023 by pixelsearch kurtykurtyboy 1 Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted May 7, 2023 Author Share Posted May 7, 2023 Interesting, after playing with your code a bit, it looks like it has something to do with _GUICtrlRichEdit_StreamFromVar vs _GUICtrlRichEdit_SetText. If I make just 2 small edits inside the RESH UDF, everything seems to be working great. In _RESH_SyntaxHighlight, change from _StreamFromVar to _SetText: ;~ _GUICtrlRichEdit_StreamFromVar($hRichEdit, $sCode) _GUICtrlRichEdit_SetText($hRichEdit, $sCode) Then in __RESH_HeaderFooter, add '\deftab416' after the first string: "\rtf1\ansi\ansicpg1252\deff0\deflang1033\deftab416" I'm not sure if there was a reason the RESH UDF was using _StreamFromVar, but it seems to be working fine so far without it... Anyway, thanks for the help @pixelsearch - I think it looks much better now. Skeletor 1 Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted May 7, 2023 Author Share Posted May 7, 2023 9 hours ago, mLipok said: Why not to use scite lexer dll ? I thought about it, but the RESH UDF was extremely easy to just drop in and it worked. Syntax highlighting was just something that was nice to have. Since this is not a full IDE, I didn't want to spend too much time on it. Link to comment Share on other sites More sharing options...
mLipok Posted May 7, 2023 Share Posted May 7, 2023 11 minutes ago, kurtykurtyboy said: I thought about it, but the RESH UDF was extremely easy to just drop in and it worked. Syntax highlighting was just something that was nice to have. Since this is not a full IDE, I didn't want to spend too much time on it. I had a plan (in the past) to make an quick editor - I mean easy to embed. If I do it in the future I will back here with the same sugestion. kurtykurtyboy 1 Signature beginning:* Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *  My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors  * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"  , be   and    \\//_. Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted May 8, 2023 Author Share Posted May 8, 2023 On 5/5/2023 at 9:12 AM, Skeletor said: When I try to create two rectangles, the first which is blue, disappears. Finally found the bug. Here's the fix, if you're interested and running from source. In _display_selection_rect, make this change: ;~ If GUICtrlGetHandle($overlay) <> -1 Then If $overlay <> -1 Then  Skeletor 1 Link to comment Share on other sites More sharing options...
Skeletor Posted May 10, 2023 Share Posted May 10, 2023 On 5/8/2023 at 8:46 PM, kurtykurtyboy said: _display_selection_rect This is found only in GuiBuilderPlus_formMain.au3 , correct? kurtykurtyboy 1 Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted May 11, 2023 Author Share Posted May 11, 2023 (edited) Updated zip in the first post with a couple bug fixes and updates. I created my own sort of build process to streamline new releases, so let me know if I missed anything in the zip. FIXED: Bug when resizing the Code Generation window FIXED: Bug control randomly disappears FIXED: More seamless positioning of resize handles when crossing zero FIXED: Code preview was not always updating ADDED: New property "Image" for Icon and Pic controls with selection dialog UPDATED: Smaller tab width in code preview Edited May 11, 2023 by kurtykurtyboy ioa747, Skeletor, pixelsearch and 1 other 4 Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted May 11, 2023 Author Share Posted May 11, 2023 @Skeletor What do you think of these Icons? Just playing around with different options... It definitely makes things look a little more modern. Skeletor 1 Link to comment Share on other sites More sharing options...
Musashi Posted May 12, 2023 Share Posted May 12, 2023 9 hours ago, kurtykurtyboy said: What do you think of these Icons? Just playing around with different options... It definitely makes things look a little more modern. As so often, design lies in the eye of the respective beholder . For me personally, I prefer the new icons too, and yes, they look more 'modern'.  "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Skeletor Posted May 12, 2023 Share Posted May 12, 2023 12 hours ago, kurtykurtyboy said: What do you think of these Icons? Just playing around with different options... It definitely makes things look a little more modern. That is fantastic @kurtykurtyboy ... those should be standard. Are they all 32x32? Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
Skeletor Posted May 12, 2023 Share Posted May 12, 2023 (edited) @kurtykurtyboy The first icon pack is available. More to come. This is the flat black design.   Flat_Black_Design.zip Edited May 12, 2023 by Skeletor kurtykurtyboy and argumentum 2 Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
Skeletor Posted May 12, 2023 Share Posted May 12, 2023 (edited) This next icon set is based on the logo colors. This icon set is called the Flat Ocean Design, in both grey or white backgrounds.    Ocean_Icons.zip Edited May 12, 2023 by Skeletor kurtykurtyboy and argumentum 2 Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted June 29, 2023 Author Share Posted June 29, 2023 I've been meaning to upload the latest updates for a bit but kept putting it off until my PC started smoking and I nearly lost a bunch of work. So here it is. Check the first post for the big old list of changes. argumentum 1 Link to comment Share on other sites More sharing options...
kurtykurtyboy Posted March 25 Author Share Posted March 25 It's been a while... updated with some fixes and improvements. FIXED: Wrong line endings when copying from code preview window FIXED: Issue changing properties when Obect Explorer window is not open FIXED: Issue when selecting controls under certain other conditions FIXED: SaveAs keyboard shortcut FIXED: Undo/Redo for Global property ADDED: Auto-size property for Labels, Buttons, and Inputs ioa747 and argumentum 2 Link to comment Share on other sites More sharing options...
winkot Posted October 3 Share Posted October 3 (edited) Looks good! I would like to be able to stretch the window down to avoid scrolling. I can't import a file created with Koda. Can you fix it? Edited October 3 by winkot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now