fett8802 Posted December 14, 2011 Share Posted December 14, 2011 Hello All, Firstly, in order to run this program, you'll need to get the zip file containing the needed files. There are a couple of includes that many of you may already have, but some may not. The file we need to look at is RadarCodev2.au3. The zip file is located here: http://www.kmillscp.com/uploads/scripts/RCv2.zip The problem I'm having is that I have a ReBar control. When pressing the buttons on the toolbar of the rebar controls, everything works out just fine. However, when using a tray icon command or a menu command, the toolbar icons disappear. In the code, I'm basically calling the function I use for the toolbar controls when I run the command from the tray or the menu. The problem is on line 550. If I take the GUICtrlCreateTabItem("") out of the equation, everything works just perfectly - except the obvious tab problems that creates. I can't figure out a work around for the life of me. I'll quickly explain the code as I don't have it commented well yet. When a toolbar button is pressed, it calls the gToolbar function which figures out which button was pressed and then calls the fToolbar function to actually carry out the command. When a menu item or tray item is pressed, fMenu is called to figure out what command was pressed at which point it then also calls the fToolbar function with the correct item to run. All commands are sent correctly and all operation is correct except that the toolbar disappears when called from the menu or tray. Any ideas? Thanks! -Fett [sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub] Link to comment Share on other sites More sharing options...
Zedna Posted December 15, 2011 Share Posted December 15, 2011 (edited) This is too big/complicated for investigating. Create small reproducing script to improve your chance for getting help. Edited December 15, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
LarsJ Posted December 16, 2011 Share Posted December 16, 2011 Use commands like this _WinAPI_RedrawWindow( $hToolBar[0], 0, 0, $RDW_ERASE + $RDW_INVALIDATE ) _WinAPI_RedrawWindow( $hToolBar[1], 0, 0, $RDW_ERASE + $RDW_INVALIDATE ) or this _GUICtrlToolbar_SetButtonState($hToolBar[0], 1, $TBSTATE_HIDDEN ) _GUICtrlToolbar_SetButtonState($hToolBar[0], 1, $TBSTATE_ENABLED) _GUICtrlToolbar_SetButtonState($hToolBar[1], 1, $TBSTATE_HIDDEN ) _GUICtrlToolbar_SetButtonState($hToolBar[1], 1, $TBSTATE_ENABLED) to refresh your toolbars. LarsJ Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
LarsJ Posted December 16, 2011 Share Posted December 16, 2011 To use _GUICtrlToolbar_SetButtonState use these commands, sorry. _GUICtrlToolbar_SetButtonState($hToolBar[0], 0, $TBSTATE_HIDDEN ) _GUICtrlToolbar_SetButtonState($hToolBar[0], 0, $TBSTATE_ENABLED) _GUICtrlToolbar_SetButtonState($hToolBar[1], 0, $TBSTATE_HIDDEN ) _GUICtrlToolbar_SetButtonState($hToolBar[1], 0, $TBSTATE_ENABLED) Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
fett8802 Posted December 16, 2011 Author Share Posted December 16, 2011 That did it. Thank you very much! [sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub] 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