User Tools

Site Tools


koda:en:documentation:complex_project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

koda:en:documentation:complex_project [2014/07/10 10:47]
koda:en:documentation:complex_project [2014/07/10 10:47] (current)
Line 1: Line 1:
 +====== Complex project ======
 +
 +Though Koda can't have an auxilary code inside it's GUI block, what limit it usefullnes for "​dynamic"​ projects, with some simple tricks you still able use it.
 +
 +===== Example 1 =====
 +In this simplest example you will see how to load checkbox state from ini file.
 +
 +<code autoit>
 +$s_Config = @ScriptDir & "​\config.ini"​
 +
 +#Region ### START Koda GUI section ### Form=MyForm.kxf
 +$hGUI = GUICreate("​hGUI",​ 633, 454, 192, 114)
 +$hOnTop = GUICtrlCreateCheckbox("​Always on top", 16, 24, 97, 17)
 +GUISetState(@SW_SHOW)
 +#EndRegion ### END Koda GUI section ###
 +
 +GUICtrlSetState(IniRead($s_Config,​ "​General",​ "​OnTop",​ "​4"​))
 +
 +;.....
 + 
 +
 +Func SaveSettings()
 +  IniWrite($s_Config,​ "​General",​ "​OnTop",​ GUICtrlRead($hOnTop))
 +EndFunc
 +</​code>​
 +
 +Now you will have chackbox flawessly load and save it's state, while you can update GUI part.
 +
 +===== Example 2 =====
 +
  
koda/en/documentation/complex_project.txt ยท Last modified: 2014/07/10 10:47 (external edit)