Posts

Modern Sidebar UI with NetWebView2Lib

Image
  #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "NetWebView2Lib.au3" Global $g_idMemo _Example() ;--------------------------------------------------------------------------------------- Func _Example()     Local $hGui = GUICreate("Modern Sidebar UI", 550, 410)     GUISetBkColor(0x252526) ; Dark Background     $g_idMemo = GUICtrlCreateEdit("", 160, 10, 370, 390, $WS_VSCROLL, 0)     GUICtrlSetFont(-1, 11, 400, 0, "Courier New")     GUICtrlSetColor(-1, 0xF0F0F0)     GUICtrlSetBkColor(-1, 0x333333)     ; We create ONE WebView2 for the entire sidebar     Local $oWebV2M = _NetWebView2_CreateManager()     Local $oBridge = _NetWebView2_GetBridge($oWebV2M, "JS_Events_")     ; Initialize on the left side (0, 0, 140, 450)     _NetWebView2_Initialize($oWebV2M, $hGui, @ScriptDir & "\UserData", 0, 0, 140, 410, True)     ; Constructing th...
Image
 https://github.com/ioa747/NetWebView2Lib/blob/main/examples/019-MarkdownViewer.au3   This is a fast and responsive Markdown editor built with AutoIt , utilizing the WebView2 control for high-performance rendering. It provides a seamless writing experience by bridging a native Windows interface with the modern Marked.js engine. Key Features: Real-Time Preview: Instantly see your Markdown rendered as HTML as you type. Smart Editing: Dedicated formatting tools for Bold, Italic, Underline, and Code snippets. File Management: Full support for creating, opening, and saving .md files with "Unsaved Changes" protection. Modern Rendering: Powered by Microsoft Edge WebView2 for accurate and secure document display. External Link Handling: Automatically intercepts web links to open them in your default system browser. Clean Export: Easily copy the generated HTML code to your clipboard for use in other applications.  

Input control for the GUI with label and rounded corners

Image
  The script demonstrates the use of functions to create input fields with and without labels, and rounded corners, where the font size changes dynamically depending on the height of Input control. Valid value for Corner    [0=Rectangle]   to   [($Height/2)=Round],   Default=($Height/4)   Example1: _CreateInputWL()