Zedna Posted August 13, 2008 Posted August 13, 2008 (edited) "Generate OnEvent code" (and similar) options in settings are default ones and they are apply to any newly created form. So, if you create form when this option was True, form will have this option always True, until you change it for this form in the Tools->Generating Options.Yes. I thought that it's application's option not related to opened forms.When I have previously opened form and I change only this option from Tools/Options and press "Run".But I haven't open/create new forms. Edited August 13, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
gcriaco Posted August 13, 2008 Posted August 13, 2008 Koda add this. Do you "attached" updown control to input control? Updown control alone have no sense and not generating anything.you'll find the attached example form with an updown control and a statusbar. I'm using v. 1.7.0.5 beta.Here's the generated code:#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <StatusBarConstants.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=C:\TEMP\UpDown.kxf$Form1 = GUICreate("Form1", 381, 301, 193, 125)$Input1 = GUICtrlCreateInput("Input1", 56, 64, 89, 21)$StatusBar1 = _GUICtrlStatusBar_Create($Form1)_GUICtrlStatusBar_SetMinHeight($StatusBar1, 25)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitchWEndI must manually include the statement: #include <GuiStatusBar.au3> in order to avoid compilation error (with the latest autoit beta release).No statement: $updown = GUICtrlCreateUpdown($input1) generatedUpDown.zip
Lazycat Posted August 13, 2008 Author Posted August 13, 2008 If users add a statusbar to a form, the generated code should insert the followin include statement:#Include <GuiStatusBar.au3>Sorry, really, this was already fixed in in my snapshot, which not released yet... Yes. I thought that it's application's option not related to opened forms.When I have previously opened form and I change only this option from Tools/Options and press "Run".But I haven't open/create new forms.Yeah, behaviour of options in the settings dialog was changed, when Koda start saving those options in the form.you'll find the attached example form with an updown control and a statusbar. I'm using v. 1.7.0.5 beta....I must manually include the statement: #include <GuiStatusBar.au3> in order to avoid compilation error (with the latest autoit beta release).No statement: $updown = GUICtrlCreateUpdown($input1) generatedgcriaco, to attach updown you should for Input1 set "UpDown" property. It have dropdown list with all updown controls available on form. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
gcriaco Posted August 14, 2008 Posted August 14, 2008 (edited) gcriaco, to attach updown you should for Input1 set "UpDown" property. It have dropdown list with all updown controls available on form.OK. Thank you.Anyway, IMHO if an updown control is not joined to an input control, Koda should display a warning message before starting the code generation. It's just an opinion.Many thanks again for sharing Koda with usPeppe Edited August 14, 2008 by gcriaco
Lazycat Posted August 15, 2008 Author Posted August 15, 2008 Anyway, IMHO if an updown control is not joined to an input control, Koda should display a warning message before starting the code generation. It's just an opinion.I think, Koda can optionally raise log window with warning in this case (when not attached updown, context menu, menu etc). Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Lazycat Posted September 3, 2008 Author Posted September 3, 2008 Well, so long from the last update, but finally here is new one http://www.autoitscript.com/fileman/users/lookfar/koda_2008-09-03.zipAdded Toolbar and ImageList creating support, right now very basic, so I need some advices what another properties are reasonable to add for visual editing.Also made an experimental change, now images that loaded into Pic, Icon, Button (and new Imagelist) controls are not save inside form. This was Delphi legacy, because it keep images inside form. For Koda and Autoit this is pointless, since you still need to have external image in order to script work. This change greatly reduce size of forms with big images linked and noticeable increase their loading speed. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Zedna Posted September 3, 2008 Posted September 3, 2008 In this latest beta 1.7.0.6 is not updated Czech language file for Koda 1.7.0.5which I posted already: http://www.autoitscript.com/forum/index.ph...st&p=513680 Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 For ListView columns widths Instead of GUICtrlSendMsg(-1, 0x101E, 0, 50) would be better: GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 _GUICtrlListView_JustifyColumn(ControlGetHandle($ListView1), 1, 1) produces error: ControlGetHandle() [built-in] called with wrong number of args. It should be: _GUICtrlListView_JustifyColumn(GUICtrlGetHandle($ListView1), 1, 1) Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 ToolBar: When I add buttons and then set style to buttons (tbsSeparator), generated code doesn't contain any style related code. Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 (edited) There is still "old bug" with bad order of controls in code generator: If you place main menu and statusbar control (and others) on the form then menu must be first and statusbar last (statusbar must be AFTER menu - not before). Here is what Koda produces, but it doesn't work: expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiStatusBar.au3> #include <GuiToolbar.au3> #include <ImageListConstants.au3> #include <ToolbarConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 593, 453, 193, 115, BitOR($WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS)) $ImageList1 = _GUIImageList_Create(16, 16, 5) _GUIImageList_AddIcon($ImageList1, "C:\Program Files\AutoIt3\SciTE\Koda\FD.exe", 0) _GUIImageList_AddIcon($ImageList1, "C:\Program Files\AutoIt3\SciTE\Koda\FD.exe", 4) $StatusBar1 = _GUICtrlStatusBar_Create($Form1) $ToolBar1 = _GUICtrlToolbar_Create($Form1, 0) _GUICtrlToolbar_SetImageList($ToolBar1, $ImageList1) _GUICtrlToolbar_AddButton($ToolBar1, 0, 0) _GUICtrlToolbar_AddButton($ToolBar1, 0, 1) _GUICtrlToolbar_AddButton($ToolBar1, 0, 2) _GUICtrlToolbar_AddButton($ToolBar1, 0, 3) $MenuItem2 = GUICtrlCreateMenu("MenuItem2") $MenuItem4 = GUICtrlCreateMenuItem("MenuItem4", $MenuItem2) $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem2) $MenuItem1 = GUICtrlCreateMenu("MenuItem1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndoÝ÷ Øw«z+¢ºÞr×r^jëh×6#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiStatusBar.au3> #include <GuiToolbar.au3> #include <ImageListConstants.au3> #include <ToolbarConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 593, 453, 193, 115, BitOR($WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS)) $MenuItem2 = GUICtrlCreateMenu("MenuItem2") $MenuItem4 = GUICtrlCreateMenuItem("MenuItem4", $MenuItem2) $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem2) $MenuItem1 = GUICtrlCreateMenu("MenuItem1") $ImageList1 = _GUIImageList_Create(16, 16, 5) _GUIImageList_AddIcon($ImageList1, "C:\Program Files\AutoIt3\SciTE\Koda\FD.exe", 0) _GUIImageList_AddIcon($ImageList1, "C:\Program Files\AutoIt3\SciTE\Koda\FD.exe", 4) $ToolBar1 = _GUICtrlToolbar_Create($Form1, 0) _GUICtrlToolbar_SetImageList($ToolBar1, $ImageList1) _GUICtrlToolbar_AddButton($ToolBar1, 0, 0) _GUICtrlToolbar_AddButton($ToolBar1, 0, 1) _GUICtrlToolbar_AddButton($ToolBar1, 0, 2) _GUICtrlToolbar_AddButton($ToolBar1, 0, 3) $StatusBar1 = _GUICtrlStatusBar_Create($Form1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited September 3, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 ToolBar: - Enabled,Visible property has no effect (visual or code) - there is no way to set "flat" toolbar style? ImageList: - Add library: index is disabled but in generated code is_GUIImageList_AddIcon() for that Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 In ToolBar button properties: At "Image index" property can be the same DropDown with images as in ImageList editor dialog at "Image index" Note: ToolBar, ImageList and external images are great LazyCat !!! Resources UDF ResourcesEx UDF AutoIt Forum Search
Lazycat Posted September 3, 2008 Author Posted September 3, 2008 In this latest beta 1.7.0.6 is not updated Czech language file for Koda 1.7.0.5Yea, I forget to replace languages in release folder... I will update archive. For ListView columns widths Instead of GUICtrlSendMsg(-1, 0x101E, 0, 50) would be better: GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)Agree. And no problem with missed declaration now, since ListViewConstants.au3 included anyway when control once appears. _GUICtrlListView_JustifyColumn(ControlGetHandle($ListView1), 1, 1) produces error: ControlGetHandle() [built-in] called with wrong number of args.Damn, what the silly mistake When I add buttons and then set style to buttons (tbsSeparator), generated code doesn't contain any style related code. - Enabled,Visible property has no effect (visual or code)Yes, this was forget and/or unfinished yet Also, looks like tbsDivider is Delphi only and have not API equivalent? There is still "old bug" with bad order of controls in code generator: If you place main menu and statusbar control (and others) on the form then menu must be first and statusbar last (statusbar must be AFTER menu - not before).No, this is by design. Actually, menu - non-visual component and have not TabOrder property. So this handled in flow, different from regular controls. Is this cause any problems? - there is no way to set "flat" toolbar style? - Add library: index is disabled but in generated code is_GUIImageList_AddIcon() for thatSet TBSTYLE_FLAT for toolbar. Not got second sentence... In ToolBar button properties: At "Image index" property can be the same DropDown with images as in ImageList editor dialog at "Image index"Maybe in future, it's need to write special property editor for that. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Zedna Posted September 3, 2008 Posted September 3, 2008 No, this is by design. Actually, menu - non-visual component and have not TabOrder property. So this handled in flow, different from regular controls. Is this cause any problems?Yes. This is problem. You may try it.StatusBar is not visible at runtime because is has bad Top position (it not reflects height of menu control). Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted September 3, 2008 Posted September 3, 2008 (edited) Not got second sentence...What is difference between "Add single" and "Add library" (at design time and in generated code)? EDIT: Nevermind. I found its logic now.I tried "Add library" on Scite.exe which has only one icon so I didn't see difference. When you choose some library containing more icons (for example fd.exe) you will see difference :-) Edited September 3, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Lazycat Posted September 3, 2008 Author Posted September 3, 2008 Yes. This is problem. You may try it.StatusBar is not visible at runtime because is has bad Top position (it not reflects height of menu control).Yeah, this make the sense. What is good for context menus, not too good main menu. At least main menu should be placed right after GUI creating. I'll try to change it.I tried "Add library" on Scite.exe which has only one icon so I didn't see difference. When you choose some library containing more icons (for example fd.exe) you will see difference :-)Terminology is bad, agree. I'm already tried few different variants (Fill... Multiple...), but this thing still not clear Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Zedna Posted September 3, 2008 Posted September 3, 2008 (edited) On WIN98SE can't be set ToolBar styles - dialog is empty. EDIT: The same result is also on WINXP Edited September 3, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Lazycat Posted September 4, 2008 Author Posted September 4, 2008 On WIN98SE can't be set ToolBar styles - dialog is empty.EDIT: The same result is also on WINXPDamn, I make more mistakes with this release then ever... There was outdated styles.xml. I reuploaded archive with new one. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Zedna Posted September 4, 2008 Posted September 4, 2008 Damn, I make more mistakes with this release then ever... There was outdated styles.xml. I reuploaded archive with new one.It isn't release it's beta so no problem with some mistakes :-)Anyway new features looks very nice !! Resources UDF ResourcesEx UDF AutoIt Forum Search
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