Jump to content

Search the Community

Showing results for tags 'modernmenu'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi peeps, are you able to please help me out with reducing/eliminating the flicker when the GUI is being resized? The example is attached. Reason for zip is that I'm using a couple of UDFs (namely: Ribbon bar and ModernMenuRaw so I've included them in the attached archive). Source here: #Region ### includes ### #include-once #NoTrayIcon #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=n #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Ribbonsbar.au3> #include <GuiListView.au3> #include <EditConstants.au3> #EndRegion ### includes ### Opt("GUIResizeMode", 802) Global $appname = 'Example App', $appver = '1.0', $additemsgui_W = 400, $additemsgui_H = 150 #Region ### $maingui ### $maingui = GUICreate($appname & ' ' & $appver, @DesktopWidth, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) $hBar = _RibbonsBar_Create($maingui, 0, 0, 0, 0, 'blue') $hTab_Home = _RibbonsBar_Create_Tab($hBar, 'Home') $hItem_FileOps = _RibbonsBar_Create_TabItem($hTab_Home, 'File operations' , 225 ) $hGrandButton_New = _RibbonsBar_Create_GrandButton($hItem_FileOps,'',412,'New',52, True ) _RibbonsBar_GrandButtons_Enable($hGrandButton_New, 0) $hDropDownNew = _RibbonsBar_Create_ContextMenu($hGrandButton_New) $hDropDownNew_1 = _GUICtrlCreateODMenuItem("Standard ...", $hDropDownNew, "smallIcons.dll", 261) $hDropDownNew_2 = _GUICtrlCreateODMenuItem("Manual ...", $hDropDownNew, "smallIcons.dll", 382) $hGrandButton_Open = _RibbonsBar_Create_GrandButton($hItem_FileOps,'',453,'Open',52, False ) _RibbonsBar_GrandButtons_Enable($hGrandButton_Open, 0) $hGrandButton_Save = _RibbonsBar_Create_GrandButton($hItem_FileOps,'',514,'Save',52, True ) _RibbonsBar_GrandButtons_Enable($hGrandButton_Save, 0) $hDropDownSave = _RibbonsBar_Create_ContextMenu($hGrandButton_Save) $hDropDownSave_1 = _GUICtrlCreateODMenuItem("Save", $hDropDownSave, "smallIcons.dll", 287) $hDropDownSave_2 = _GUICtrlCreateODMenuItem("Save As ...", $hDropDownSave, "smallIcons.dll", 286) $hGrandButton_Export = _RibbonsBar_Create_GrandButton($hItem_FileOps,'',337,'Export',62, True ) _RibbonsBar_GrandButtons_Enable($hGrandButton_Export, 0) $hDropDownExport = _RibbonsBar_Create_ContextMenu($hGrandButton_Export) $hDropDownExport_1 = _GUICtrlCreateODMenuItem("To Excel", $hDropDownExport, "smallIcons.dll", 1243) $hItem_ItemOps = _RibbonsBar_Create_TabItem ( $hTab_Home, 'Item operations' , 393 ) $hGrandButton_AddItems = _RibbonsBar_Create_GrandButton($hItem_ItemOps,'',301,'Add item(s)',72, True ) $hDropDownAddItems = _RibbonsBar_Create_ContextMenu($hGrandButton_AddItems) _RibbonsBar_GrandButtons_Enable($hGrandButton_AddItems, 0) $hDropDownAddItems_1 = _GUICtrlCreateODMenuItem("From Catalogue", $hDropDownAddItems, "smallIcons.dll", 173) $hDropDownAddItems_2 = _GUICtrlCreateODMenuItem("From Quote", $hDropDownAddItems, "smallIcons.dll", 143) $hDropDownAddItems_3 = _GUICtrlCreateODMenuItem("Paste", $hDropDownAddItems, "smallIcons.dll", 9) $hGrandButton_DelItems = _RibbonsBar_Create_GrandButton($hItem_ItemOps,'',615,'Delete item(s)',82, False ) _RibbonsBar_GrandButtons_Enable($hGrandButton_DelItems, 0) $SmallButton_Undo = _RibbonsBar_Create_SmallButton($hItem_ItemOps,'',728,1,'Undo (Test: click to enable grand buttons)',230) $SmallButton_Redo = _RibbonsBar_Create_SmallButton($hItem_ItemOps,'',194,2,'Redo (Test: click to disable grand buttons)',230) _RibbonsBar_SmallButtons_Enable($SmallButton_Redo, 0) $hTab_Help = _RibbonsBar_Create_Tab( $hBar, 'Help' ) $hItem_Information = _RibbonsBar_Create_TabItem ( $hTab_Help, 'Information' , 120 ) $hGrandButton_About = _RibbonsBar_Create_GrandButton($hItem_Information,'',631,'Help','',False) $hGrandButton_About = _RibbonsBar_Create_GrandButton($hItem_Information,'',644,'About','',False) _RibbonsBar_Tab_SetState($hTab_Home) GUISwitch($maingui) WinMove($maingui, "", Default, Default, 800, Default) $wPos = WinGetPos($maingui) WinMove($maingui, "", @DesktopWidth/2 - $wPos[2]/2, @DesktopHeight/2 - $wPos[3]/2, Default, Default) $wPos = WinGetPos($maingui) $mainlistview = GUICtrlCreateListView('Col 1|Col 2|Col 3|Col 4|Col 5|Col 6', -2, 120, _ $wPos[2], $wPos[3], Default) _GUICtrlListView_SetExtendedListViewStyle($mainlistview, BitOR($LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT, $LVS_EX_DOUBLEBUFFER, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES, $LVS_EX_FLATSB)) _GUICtrlListView_SetColumnWidth($mainlistview, 0, 120) _GUICtrlListView_SetColumnWidth($mainlistview, 1, 250) _GUICtrlListView_SetColumnWidth($mainlistview, 2, 50) _GUICtrlListView_SetColumnWidth($mainlistview, 3, 100) _GUICtrlListView_SetColumnWidth($mainlistview, 4, 100) _GUICtrlListView_SetColumnWidth($mainlistview, 5, 50) #EndRegion ### $additemsgui ### #Region ### $additemsgui ### $additemsgui = GUICreate('Add item(s) from Catalogue', $additemsgui_W, $additemsgui_H, 0, 0, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX), $WS_EX_MDICHILD, $maingui) GUISetBkColor(0xf2f8ff) GUISetFont(10, 400) $additems_addlabel = GUICtrlCreateLabel('Start typing below to add item(s) from catalogue (min 2 chars):', 10, 15, $additemsgui_W - 20, 21) $additemsinput = GUICtrlCreateInput('', 10, 45, $additemsgui_W - 20, Default) GUICtrlSendMsg(-1, $EM_SETCUEBANNER, False, 'Enter an item number here') $additemsbn_add = GUICtrlCreateButton('Add', 10, 85, 110, 40) #EndRegion ### $additemsgui ### GUIRegisterMsg($WM_GETMINMAXINFO, "WM_GETMINMAXINFO") ; Register WM_GETMINMAXINFO GUISetState(@SW_SHOW, $maingui) GUICtrlSetResizing($mainlistview, BitOR($GUI_DOCKLEFT, $GUI_DOCKRIGHT, $GUI_DOCKTOP)) While 1 $msg = GUIGetMsg(1) Switch $msg[1] Case $maingui Switch $msg[0] Case $GUI_EVENT_CLOSE Exit Case $hDropDownAddItems_1 GUISetState(@SW_DISABLE, $maingui) $mPos = WinGetPos($maingui) WinMove($additemsgui, '', $mPos[0] + (($mPos[2]/2) - ($additemsgui_W/2)), $mPos[1] + (($mPos[3]/2) - ($additemsgui_H/2))) GUICtrlSetData($additemsinput, '') GUISetState(@SW_SHOW, $additemsgui) _WinAPI_SetFocus(ControlGetHandle('', '', $additems_addlabel)) Case $hDropDownNew_1 ConsoleWrite('Clicked "New" menu item 1'&@CRLF) Case $hDropDownNew_2 ConsoleWrite('Clicked "New" menu item 2'&@CRLF) EndSwitch Case $additemsgui Switch $msg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $maingui) GUISetState(@SW_HIDE, $additemsgui) EndSwitch EndSwitch Switch _RibbonsBar_GetMsg() Case $hGrandButton_Open ConsoleWrite('open...'&@CRLF) Case $SmallButton_Undo _RibbonsBar_GrandButtons_Enable($hGrandButton_New, 1) _RibbonsBar_GrandButtons_Enable($hGrandButton_Save, 1) _RibbonsBar_GrandButtons_Enable($hGrandButton_Export, 1) _RibbonsBar_GrandButtons_Enable($hGrandButton_AddItems, 1) _RibbonsBar_GrandButtons_Enable($hGrandButton_DelItems, 1) _RibbonsBar_GrandButtons_Enable($hGrandButton_Open, 1) If _RibbonsBar_SmallButtons_GetState($SmallButton_Undo) = 1 Then ConsoleWrite('undo...'&@CRLF) EndIf Case $SmallButton_Redo _RibbonsBar_GrandButtons_Enable($hGrandButton_New, 0) _RibbonsBar_GrandButtons_Enable($hGrandButton_Save, 0) _RibbonsBar_GrandButtons_Enable($hGrandButton_Export, 0) _RibbonsBar_GrandButtons_Enable($hGrandButton_AddItems, 0) _RibbonsBar_GrandButtons_Enable($hGrandButton_DelItems, 0) _RibbonsBar_GrandButtons_Enable($hGrandButton_Open, 0) If _RibbonsBar_SmallButtons_GetState($SmallButton_Redo) = 1 Then ConsoleWrite('redo...'&@CRLF) EndIf Case $hTab_Home _RibbonsBar_Tab_SetState($hTab_Home) Case $hGrandButton_Export _RibbonsBar_ContextMenu_SetState($hDropDownExport) Case $hGrandButton_Save _RibbonsBar_ContextMenu_SetState($hDropDownSave) Case $hGrandButton_AddItems _RibbonsBar_ContextMenu_SetState($hDropDownAddItems) Case $hGrandButton_New _RibbonsBar_ContextMenu_SetState($hDropDownNew) Case $hTab_Help _RibbonsBar_Tab_SetState($hTab_Help) EndSwitch WEnd Func WM_GETMINMAXINFO($hwnd, $Msg, $wParam, $lParam) If $hWnd = $maingui Then $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($tagMaxinfo, 7, 800) ; W (min size) DllStructSetData($tagMaxinfo, 8, 600) ; H (min size) Return 0 EndIf EndFunc ;==>WM_GETMINMAXINFO Thanks heaps in advance! example.zip
×
×
  • Create New...