Madza91 Posted October 29, 2007 Author Share Posted October 29, 2007 (edited) Or to delete all items except this "about" !? Edited October 29, 2007 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Zedna Posted October 29, 2007 Share Posted October 29, 2007 Hey, is possible to make this but without button bug, see this: #include <GUIConstants.au3> GUICreate("GUI with more treeviews", 340, 200, -1, -1) $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $generalitem = GUICtrlCreateTreeViewItem("General", $maintree) $toolsitem = GUICtrlCreateTreeViewItem("Tools", $maintree) $effectitem = GUICtrlCreateTreeViewItem("Effects", $maintree) $styleitem = GUICtrlCreateTreeViewItem("Styles", $maintree) $cmditem = GUICtrlCreateTreeViewItem("Commandline", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Misc", $maintree) $edit = GUICtrlCreateEdit("", 150, 44, 163, 20, $ES_AUTOHSCROLL) GUICtrlCreateLabel("Type 'about' in edit", 150, 25, 100, 17) $about_button = GUICtrlCreateButton("Bugged Button:)", 150, 70, 81, 25, 0) GUICtrlSetState($about_button, $GUI_HIDE ) $cancelbutton = GUICtrlCreateButton("Cancel", 130, 170, 70, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton ExitLoop EndSelect $item = GUICtrlRead($edit) If $item = "About" Then If BitAND(GUICtrlGetState($about_button), $GUI_HIDE ) = $GUI_HIDE Then GUICtrlSetState($about_button, $GUI_SHOW ) EndIf WEnd GUIDelete() Exit Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Madza91 Posted October 29, 2007 Author Share Posted October 29, 2007 Yea, that is great, but one more question, i want to enable button when is in edit some text typed, and if is deleted to disable button, like in msn [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Zedna Posted October 29, 2007 Share Posted October 29, 2007 Yea, that is great, but one more question, i want to enable button when is in edit some text typed, and if is deleted to disable button, like in msn I said already I will not do scripts for you.I gave you concept script. So take it, play with it, accomodate it to your wishes ...Instead of $GUI_HIDE/$GUI_SHOW use $GUI_DISABLE/$GUI_ENABLE Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Madza91 Posted October 30, 2007 Author Share Posted October 30, 2007 Ok,tnx [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Madza91 Posted November 20, 2007 Author Share Posted November 20, 2007 This is smothing what i want but when enter in edit some name from items to select him :/ #include <GUIConstants.au3> GUICreate("GUI with more treeviews", 340, 200, -1, -1) $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $generalitem = GUICtrlCreateTreeViewItem("General", $maintree) $toolsitem = GUICtrlCreateTreeViewItem("Tools", $maintree) $effectitem = GUICtrlCreateTreeViewItem("Effects", $maintree) $styleitem = GUICtrlCreateTreeViewItem("Styles", $maintree) $cmditem = GUICtrlCreateTreeViewItem("Commandline", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Type", $maintree) $edit = GUICtrlCreateEdit("", 150, 44, 163, 20, $ES_AUTOHSCROLL) $label = GUICtrlCreateLabel("Type", 150, 25, 100, 17) $about_button = GUICtrlCreateButton("Bugged Button:)", 150, 70, 81, 25, 0) $cancelbutton = GUICtrlCreateButton("Cancel", 130, 170, 70, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton ExitLoop EndSelect $item = GUICtrlRead($edit) $asd = Guictrlread($label) If $item > "" Then If BitAND(GUICtrlGetState($about_button), $GUI_DISABLE ) = $GUI_DISABLE Then GUICtrlSetState($about_button, $GUI_ENABLE ) ElseIf $item <> "0" Then If BitAND(GUICtrlGetState($about_button), $GUI_ENABLE ) = $GUI_ENABLE Then GUICtrlSetState($about_button, $GUI_DISABLE ) EndIf WEnd GUIDelete() Exit [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Madza91 Posted November 26, 2007 Author Share Posted November 26, 2007 (edited) anybody ??? i just want to enter treeview item name in edit and select him :/ Edited November 26, 2007 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
ValeryVal Posted November 26, 2007 Share Posted November 26, 2007 expandcollapse popup#include <GUIConstants.au3> GUICreate("GUI with more treeviews", 340, 200, -1, -1) $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $generalitem = GUICtrlCreateTreeViewItem("General", $maintree) $toolsitem = GUICtrlCreateTreeViewItem("Tools", $maintree) $effectitem = GUICtrlCreateTreeViewItem("Effects", $maintree) $styleitem = GUICtrlCreateTreeViewItem("Styles", $maintree) $cmditem = GUICtrlCreateTreeViewItem("Commandline", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Type", $maintree) $edit = GUICtrlCreateEdit("", 150, 44, 163, 20, $ES_AUTOHSCROLL) $label = GUICtrlCreateLabel("Type", 150, 25, 100, 17) $about_button = GUICtrlCreateButton("Bugged Button:)", 150, 70, 81, 25, 0) $cancelbutton = GUICtrlCreateButton("Cancel", 130, 170, 70, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton ExitLoop Case $msg = $about_button $item = GUICtrlRead($edit) ControlTreeView ( "GUI with more treeviews", "", $maintree, "Select", $item) EndSelect $item = GUICtrlRead($edit) $asd = Guictrlread($label) If $item > "" Then If BitAND(GUICtrlGetState($about_button), $GUI_DISABLE ) = $GUI_DISABLE Then GUICtrlSetState($about_button, $GUI_ENABLE ) ElseIf $item <> "0" Then If BitAND(GUICtrlGetState($about_button), $GUI_ENABLE ) = $GUI_ENABLE Then GUICtrlSetState($about_button, $GUI_DISABLE ) EndIf WEnd GUIDelete() Exit The point of world view Link to comment Share on other sites More sharing options...
Madza91 Posted November 26, 2007 Author Share Posted November 26, 2007 Thank you man.. that is very cool... but tis is better but bugged, first item is selected if edit = "" why? expandcollapse popup#include <GUIConstants.au3> GUICreate("GUI with more treeviews", 340, 200, -1, -1) $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $generalitem = GUICtrlCreateTreeViewItem("General", $maintree) $toolsitem = GUICtrlCreateTreeViewItem("Tools", $maintree) $effectitem = GUICtrlCreateTreeViewItem("Effects", $maintree) $styleitem = GUICtrlCreateTreeViewItem("Styles", $maintree) $cmditem = GUICtrlCreateTreeViewItem("Commandline", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Type", $maintree) $edit = GUICtrlCreateEdit("", 150, 44, 163, 20, $ES_AUTOHSCROLL) $label = GUICtrlCreateLabel("Type", 150, 25, 100, 17) $about_button = GUICtrlCreateButton("Bugged Button:)", 150, 70, 81, 25, 0) $cancelbutton = GUICtrlCreateButton("Cancel", 130, 170, 70, 20) GUISetState() While 1 $item = GUICtrlRead($edit) ControlTreeView ( "GUI with more treeviews", "", $maintree, "Select", $item) $msg = GUIGetMsg() Select Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton ExitLoop EndSelect $item = GUICtrlRead($edit) $asd = Guictrlread($label) If $item > "" Then If BitAND(GUICtrlGetState($about_button), $GUI_DISABLE ) = $GUI_DISABLE Then GUICtrlSetState($about_button, $GUI_ENABLE ) ElseIf $item <> "0" Then If BitAND(GUICtrlGetState($about_button), $GUI_ENABLE ) = $GUI_ENABLE Then GUICtrlSetState($about_button, $GUI_DISABLE ) EndIf WEnd GUIDelete() Exit [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Madza91 Posted November 26, 2007 Author Share Posted November 26, 2007 (edited) Fixed but i dont know how to deselect item :/ expandcollapse popup#include <GUIConstants.au3> GUICreate("GUI with more treeviews", 340, 200, -1, -1) $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $generalitem = GUICtrlCreateTreeViewItem("General", $maintree) $toolsitem = GUICtrlCreateTreeViewItem("Tools", $maintree) $effectitem = GUICtrlCreateTreeViewItem("Tools2", $maintree) $styleitem = GUICtrlCreateTreeViewItem("Styles", $maintree) $cmditem = GUICtrlCreateTreeViewItem("Commandline", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Type", $maintree) $edit = GUICtrlCreateEdit("", 150, 44, 163, 20, $ES_AUTOHSCROLL) $label = GUICtrlCreateLabel("Type", 150, 25, 100, 17) $about_button = GUICtrlCreateButton("Bugged Button:)", 150, 70, 81, 25, 0) $cancelbutton = GUICtrlCreateButton("Cancel", 130, 170, 70, 20) GUISetState() While 1 $item = GUICtrlRead($edit) If $item = "" Then ElseIf $item <> "" Then ControlTreeView( "GUI with more treeviews", "", $maintree, "Select", $item) EndIf $msg = GUIGetMsg() Select Case $msg = -3 Or $msg = -1 Or $msg = $cancelbutton ExitLoop EndSelect $item = GUICtrlRead($edit) $asd = Guictrlread($label) If $item > "" Then If BitAND(GUICtrlGetState($about_button), $GUI_DISABLE ) = $GUI_DISABLE Then GUICtrlSetState($about_button, $GUI_ENABLE ) ElseIf $item <> "0" Then If BitAND(GUICtrlGetState($about_button), $GUI_ENABLE ) = $GUI_ENABLE Then GUICtrlSetState($about_button, $GUI_DISABLE ) EndIf WEnd GUIDelete() Exit Edited November 26, 2007 by n3nE [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
ValeryVal Posted November 27, 2007 Share Posted November 27, 2007 but i dont know how to deselect item :/Is there reason to do it? Comment, please! The point of world view Link to comment Share on other sites More sharing options...
Madza91 Posted December 17, 2007 Author Share Posted December 17, 2007 Look for this script pls: Type for example Item5 and delete and automaticly will be selected first item :/ #include <GuiConstants.au3> #include <GuiTreeView.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $TreeView1 = GUICtrlCreateTreeView(20, 30, 130, 200, BitOR($TVS_HASBUTTONS, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_TRACKSELECT, $TVS_FULLROWSELECT, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER, $WS_CLIPSIBLINGS), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) _GUICtrlTreeView_SetTextColor ($TreeView1, 0xDC143C) _GUICtrlTreeView_SetBkColor ($TreeView1, 0x40e0d0) Guictrlcreatetreeviewitem("Item1",$TreeView1) Guictrlcreatetreeviewitem("Item2",$TreeView1) Guictrlcreatetreeviewitem("Item3",$TreeView1) Guictrlcreatetreeviewitem("Item4",$TreeView1) Guictrlcreatetreeviewitem("Item5",$TreeView1) Guictrlcreatetreeviewitem("Item6",$TreeView1) $Label0a = GUICtrlCreateEdit("", 247, 38, 100, 19, $ES_AUTOHSCROLL) GuiSetState() $old1 = "" While 1 $item = GUICtrlRead($Label0a) If $item <> $old1 Then $old1 = $item ControlTreeView ("MyGUI", "", $TreeView1, "Select", $item) EndIf $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
smashly Posted December 18, 2007 Share Posted December 18, 2007 Hi, how hard can it be?expandcollapse popup#include <GuiConstants.au3> #include <GuiTreeView.au3> GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $TreeView1 = GUICtrlCreateTreeView(20, 30, 130, 200, BitOR($TVS_HASBUTTONS, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS, $TVS_TRACKSELECT, $TVS_FULLROWSELECT, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER, $WS_CLIPSIBLINGS), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) _GUICtrlTreeView_SetTextColor ($TreeView1, 0xDC143C) _GUICtrlTreeView_SetBkColor ($TreeView1, 0x40e0d0) Guictrlcreatetreeviewitem("Item1",$TreeView1) Guictrlcreatetreeviewitem("Item2",$TreeView1) Guictrlcreatetreeviewitem("Item3",$TreeView1) Guictrlcreatetreeviewitem("Item4",$TreeView1) Guictrlcreatetreeviewitem("Item5",$TreeView1) Guictrlcreatetreeviewitem("Item6",$TreeView1) $Input = GUICtrlCreateInput("", 247, 38, 100, 19, $ES_AUTOHSCROLL) GuiSetState() $old1 = "" While 1 If GuiCtrlRead($Input) <> $old1 Then Local $FindEx = _GUICtrlTreeView_FindItemEx(GUICtrlGetHandle($TreeView1), GUICtrlRead($Input)) If $FindEx Then _GUICtrlTreeView_SelectItem(GUICtrlGetHandle($TreeView1), $FindEx, $TVGN_CARET) Else If GUICtrlRead($TreeView1) Then _GUICtrlTreeView_SetState(GUICtrlGetHandle($TreeView1), GUICtrlGetHandle(GUICtrlRead($TreeView1)), 0, $TVIS_SELECTED) EndIf $old1 = GuiCtrlRead($Input) EndIf $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Cheers Link to comment Share on other sites More sharing options...
Madza91 Posted December 18, 2007 Author Share Posted December 18, 2007 really is not hard, tnx [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) 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