Jump to content

GUI_EXPAND doesn't work on XP?


this-is-me
 Share

Recommended Posts

I haven't tried on anything other than XP, but this is an example from holger:

#include <guiconstants.au3>
Opt("GuiOnEventMode", 0)
GUICreate("GUI with a treeview",340,200,-1,-1,BitOr($WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU))
$maintree = GUICtrlCreateTreeview(10,10,170,150)
GUICtrlSetImage(-1,"shell32.dll",3,4); icon for default nonselected state
GUICtrlSetImage(-1,"shell32.dll",4,2); icon for default selected state

$aboutitem = GUICtrlCreateTreeviewitem("About",$maintree)
GUICtrlSetImage($aboutitem,"shell32.dll",23)

$generalitem = GUICtrlCreateTreeviewitem("General",$maintree)
GUICtrlSetImage(-1,"shell32.dll",15)

$toolsitem = GUICtrlCreateTreeviewitem("Tools",$maintree)
GUICtrlSetImage(-1,"shell32.dll",21)

$effectitem = GUICtrlCreateTreeviewitem("Effects",$generalitem)

$styleitem = GUICtrlCreateTreeviewitem("Styles",$generalitem)
GUICtrlSetImage(-1,"shell32.dll",24,2)
GUICtrlSetImage(-1,"shell32.dll",25,4)

$cmditem = GUICtrlCreateTreeviewitem("Commandline",$toolsitem)

$miscitem = GUICtrlCreateTreeviewitem("Misc",$toolsitem)


GUISetState(@SW_SHOW)

GUICtrlSetState($generalitem,$GUI_EXPAND)

While 1
  $msg = GUIGetMsg()
  Select
     Case $msg = -3
        ExitLoop
     Case $msg = $miscitem
        GUICtrlSetImage($maintree,"shell32.dlls",9,2)
        GUICtrlSetImage($maintree,"shell32.dlls",10,4)
   EndSelect
WEnd

GUIDelete()
Exit

This should expand the general item and show the subitems, but it does not.

Edited by this-is-me
Who else would I be?
Link to comment
Share on other sites

Yeah, it did work...

I check out now where the problem is...

Edit: found a problem in the CtrlSetState-function.

Send the bugfixing to Jon and JP (cc).

@this-is-me / CyberSlug: Thanks for information :)

Regards Holger

Edited by Holger
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...