Jump to content

Recommended Posts

Posted (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

RTF-text-in-Rich-Edit-using-deftab-N.png

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 by pixelsearch

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted

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"

image.png.24c5512299acbe1bb58b42c4c7af14da.png

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.

Posted
  On 5/7/2023 at 10:39 AM, mLipok said:

Why not to use scite lexer dll ?

Expand  

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.

Posted
  On 5/7/2023 at 8:18 PM, 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.

Expand  

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.

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 Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • kurtykurtyboy changed the title to GuiBuilderPlus [updated May 10, 2023]
Posted (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 by kurtykurtyboy
Posted
  On 5/11/2023 at 7:17 PM, kurtykurtyboy said:

What do you think of these Icons? Just playing around with different options... It definitely makes things look a little more modern.

Expand  

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'.

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted
  On 5/11/2023 at 7:17 PM, kurtykurtyboy said:

What do you think of these Icons? Just playing around with different options... It definitely makes things look a little more modern.

Expand  

That is fantastic @kurtykurtyboy ... those should be standard. 

Are they all 32x32?

Kind Regards
Skeletor

"Coffee: my defense against going postal."

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI

Posted (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.

image.png.f64023bb9da713e0efaa3fc1782c1f67.png    image.png.0a0dc7d1ac7a7d4816d2d7e5fdbb1c4c.png

Ocean_Icons.zipFetching info...

Edited by Skeletor

Kind Regards
Skeletor

"Coffee: my defense against going postal."

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI

  • kurtykurtyboy changed the title to GuiBuilderPlus [updated March 24, 2024]
Posted

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
  • 6 months later...
Posted (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 by winkot

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...