Jump to content

KODA Parser : Easy GUI creation by direct .kxf file read

Recommended Posts

DEPRECATED: see this new UDF



Here is a function that parses .kxf (KODA Form) file and directly generates the GUI for your program.

For now, it is beta (buggy and incomplete).

Supported controls: label, button, input, edit, checkbox, radio, list, combo, group, pic, icon, dummy, controlGroup, slider, progress, date, monthCal, treeView (no items), listView (no items), tab/tabSheet, menus (main, popup)

Supported options: font, colors (text and background), cursor, hint (tool tip), visible, enable/disable, checked/unchecked, resizing

TODO and bugs:

  • GUI size bug
  • Other controls (image list, IP, tool bar, status bar, tray menu, avi, up-down, graphics, COM object (really useful?))
  • Hotkeys (accelerators)
  • KXF text encoding problem



Update (30/10/2019):

  • To have a correctly sized GUI, you must manually pass it's size to the function (get the right GUI size from KODA generated code)
  • Workarround for text encoding problem: kxf file is read as ANSI before being loaded by XMLDOM

Update (05/12/2019):

  • Added ability to specify parent GUI (parent GUI set in KODA is now ignored)
  • Added helper functions to: set accelerators, get GUI handle, get control ID/handle, set/get user variables
  • Fixed TabSheet control ID not set
  • Fixed control resizing not set

Update (12/12/2019):

  • Fixe window visiblity control

Update (17/12/2019):

  • Control groups acces: Added ability to directly acces child controls of: Group, ControlGroup, Tab and TabSheet (functions _KODAForm_CtrlChildrenXXX)
  • Script Breaking: renamed _KODAForm_GetItem and _KODAForm_SetItem to _KODAForm_GetUserData and _KODAFOrm_SetUserData. UserData are now isolated from other GUI controls in the $oForm object
  • Also: some minor internal tweaks in object items naming



Edited by matwachich

Share this post

Link to post
Share on other sites


Let's see a standard workflow for developping a GUI application using KODA:

  • You create your GUI with KODA
  • You export and past the GUI creation code onto your script
  • You Run, it works
  • You (I) many times need to make some manual tweaks on the KODA generated code, and I forget (or cannot) mirror these modifications on KODA
  • After that, I need to modify the GUI, so I do it on KODA, repeat steps 1 and 2, but here, the manual modifications are lost! And you need to redo them

With this function:

  • You create your GUI with KODA
  • Embeed the .kxf file with your script
  • And every time you modifiy your GUI on KODA, you don't have to touch/modify your script!
  • Also, your custom modifications are done after calling the function, so you don't loose them or need to redo them

Share this post

Link to post
Share on other sites

Very useful, I too have this issue. Well done on providing something that will wake the KODA community up and update the program.

Kind Regards

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen

Share this post

Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...