Jump to content

KODA FormDesigner ver 1.3


lookfar
 Share

Recommended Posts

(...)

$bTableDyStart = $bTableRYstart + $bTableRheight + $ySpacing
$bTableD = GUICtrlCreateButton("Delete Table", $bTableRxStart, $bTableDyStart, $bTableRwidth, $bTableRheight)
GUICtrlSetOnEvent(-1, "DeleteTable")

Instead of putting the values in the AU3 code hard coded, you can use variables and fill the variables with the data read by the XML COM from the KODA file.

Ohh, I fear to imagine what size of script will be this way B) This is the lots of variables... Guess noone can gain an understanding this code by hand. I think it's still need though more about.

Anyway, as you say

...this might be something for a later release.

:o

Yes in a dropdown box, and line number would work very well!

None-the-less 'NoVariable' Sounds great. (Would also be handy in group creation.)

Done both, now you have enable "HaveVariable" property to generate variable of label (false by default).

Also, it would be great if we could set the color of controls using a variable name.

IE: I use two globals ($hGUIColorBack & $hGUIColorText) to set all gui items in my script.

Understand, but not see yet good way to implement this... Atm you can set all colors to one value and then search&replace them in editor.

I wonder if you should post a request enumerating the ones not in GUIConstants.au3, and that they be included in GUIConstants.au3.

or

Should you provide a supplementary list until they can be included in GUIConstants.au3.

or

Just insert them into the generated code as needed.

Yes, imo the best - create additional list of styles that absent in GUIConstants. After that those styles can be moved to main list.

Though, note that some styles are not applicable to Autoit, so no reason to include them at all.

Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Yes, imo the best - create additional list of styles that absent in GUIConstants. After that those styles can be moved to main list.

Though, note that some styles are not applicable to Autoit, so no reason to include them at all.

So far I've only tried to use 2 that aren't in GUIConstants.au3 $LBS_MULTISEL and $LBS_EXTENDEDSEL and both seem to work. I did find these on the Internet even though I haven't been able to find a general list with values yet.

B)

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Hello, Just discovered AutoIt and KODA(for which much thanks)!

I've found what may be a peculiarity in KODA Stable & Beta

(probably due to my own combination of h/w & s/w)

The initial form (AForm1) that is created on program startup is

resizable but new forms can not be resized by grabbing with the

cursor at the corners/edges. Changing the width and height does

work however.

I am running Windows 2k Professional w/all updates

Link to comment
Share on other sites

The initial form (AForm1) that is created on program startup is

resizable but new forms can not be resized by grabbing with the

cursor at the corners/edges. Changing the width and height does

work however.

Thanks for research, this because default form styles are set to default Autoit values (which create not resizeable box by default). I'll add WS_SIZEBOX value to "safe" set, so with default Koda's setting (don't reflect unsafe styles) you will be able resize form even if this style is unchecked.

Link to comment
Share on other sites

Thanks for research, this because default form styles are set to default Autoit values (which create not resizeable box by default). I'll add WS_SIZEBOX value to "safe" set, so with default Koda's setting (don't reflect unsafe styles) you will be able resize form even if this style is unchecked.

Thanks! Agree it should be default. Discovered that checking WS_SIZEBOX enables

resizing so there is a work around.

Link to comment
Share on other sites

Version 1.4

Version 1.4 has just been uploaded.

very many changes have been implemented.

Including support for COM ActiveX , look in Win32 Tab.

new and improved Template Gallery:

You may create your own custom templates by creating a sub folder under the Templates folder and placing your forms in that. They will then show up in the templates gallery.

Forms have a description field in Object Inspector that will describe your template.

The Icon that you use for the form will show up as the icon in the Gallery Dialog..

there have been various fixes that have been discussed in this thread.

Have Fun!

Link to comment
Share on other sites

nice !!

question - I have tried to add the spin edit (updown) control to a form but I cannot get it to work, If I add that control to a blank form Koda generates this code:

#include <GUIConstants.au3>

;Generated with Form Designer preview
$Form1 = GUICreate("AForm1", 622, 441, 192, 125)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

What am I doing wrong?

Link to comment
Share on other sites

nice !!

question - I have tried to add the spin edit (updown) control to a form but I cannot get it to work, If I add that control to a blank form Koda generates this code:

What am I doing wrong?

The UpDown control is not used alone but rather in conjuction with Inputbox.

after placing an Inputbox and a UpDown on a form, select the Inputbox and goto Object Inspector properties

and look for "UpDown" and choose the control from the dropdown list

Link to comment
Share on other sites

Version 1.4

Version 1.4 has just been uploaded.

very many changes have been implemented.

Including support for COM ActiveX , look in Win32 Tab.

new and improved Template Gallery:

You may create your own custom templates by creating a sub folder under the Templates folder and placing your forms in that. They will then show up in the templates gallery.

Forms have a description field in Object Inspector that will describe your template.

The Icon that you use for the form will show up as the icon in the Gallery Dialog..

there have been various fixes that have been discussed in this thread.

Have Fun!

Thanks for the continued development!

I opened the "About" template and replaced the graphic with a transparent background .GIF. It displays correctly in Koda unless I 'run' it or if I clipboard it out to an .au3 file. When run, in Koda or elsewhere it displays as if the .GIF had a white background. I tried turning off the "Don't reflect unsafe styles checkbox, but either way I didn't see a style that indicated transparency. Is this a Koda thing, an AutoIt thing, or have I just not been paying close enough attention?

Edit: I have since discovered another thread on this issue in AutoIt. It is at the following URL.

http://www.autoitscript.com/forum/index.php?showtopic=17799

Edit2: Here is yet another one, but at least this wasn't obvious.

Text on top of everything Options

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Nice work of v1.4! Great improvements to last ver.

I find that the name property of forms doesn't restore from .kxf files. It causes a promblem in generating codes...

;Generated with Form Designer preview
$ = GUICreate("Form which loses the name", 398, 246, 266, 155)
...
Link to comment
Share on other sites

Is that a form from an older version?

I'm not able to duplicate, what are the steps that lead up to that error?

for the $ = GUICreate(....

just update the name to nothing. I think in this cas,e no assignment must be generated B)

Link to comment
Share on other sites

Link to comment
Share on other sites

Very good idea in the view of usability, but looks like this is impossible: each object should have unique name...

You need to differentiate the internal Koda name and the one use in scripting. I was assuming that I was only changing the variable script name.
Link to comment
Share on other sites

You need to differentiate the internal Koda name and the one use in scripting. I was assuming that I was only changing the variable script name.

I vote for that, I am very impressed with Koda, it is a tremendous tool!

Each form I generate, the first thing I do is rename all or nearly all the handle variables to something that's meaningful when Im not looking at the code lines that create the form and controls.

An example is below:

$ScreenTitle = GUICreate($sScreenTitle, 594, 421, 263, 118)
GUISetIcon ( "K:\_Documents\_Dev\Icons\Alumni2.ico" )
$TabGroup = GUICtrlCreateTab(10, 0, 570, 360)

$TabContact = GUICtrlCreateTabItem("Contact")
$T1name = GUICtrlCreateInput("(Name) Maiden-Last", 20, 30, 141, 24, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetState($T1name, $GUI_FOCUS)
$T1Combo = GUICtrlCreateCombo("", 170, 30, 151, 200)
$T1List = GUICtrlCreateList("", 20, 60, 551, 118, BitOR($LBS_STANDARD, $WS_VSCROLL), $WS_EX_CLIENTEDGE)
$T1Lname = GUICtrlCreateInput("Lname", 21, 180, 157, 24, -1, $WS_EX_CLIENTEDGE)
$T1Fname = GUICtrlCreateInput("Fname", 187, 180, 157, 24, -1, $WS_EX_CLIENTEDGE)
$T1Initial = GUICtrlCreateInput("Initial", 354, 180, 41, 24, -1, $WS_EX_CLIENTEDGE)
$T1Addr1 = GUICtrlCreateInput("Address1", 20, 210, 188, 24, -1, $WS_EX_CLIENTEDGE)
$T1Addr2 = GUICtrlCreateInput("Address2", 210, 210, 188, 24, -1, $WS_EX_CLIENTEDGE)
$T1City = GUICtrlCreateInput("City", 20, 240, 188, 24, -1, $WS_EX_CLIENTEDGE)
$T1State = GUICtrlCreateInput("St", 210, 240, 25, 24, -1, $WS_EX_CLIENTEDGE)
$T1Zip = GUICtrlCreateInput("Zip", 240, 240, 77, 24, -1, $WS_EX_CLIENTEDGE)
$T1Birthday = GUICtrlCreateInput("Birthday", 320, 240, 78, 24, -1, $WS_EX_CLIENTEDGE)
$T1Email1 = GUICtrlCreateInput("Email1", 20, 270, 377, 24, -1, $WS_EX_CLIENTEDGE)
$T1Email2 = GUICtrlCreateInput("Email2", 20, 300, 377, 24, -1, $WS_EX_CLIENTEDGE)
$T1Phone = GUICtrlCreateInput("Phone", 403, 180, 113, 24, -1, $WS_EX_CLIENTEDGE)
$T1PhExt = GUICtrlCreateInput("Ext.", 520, 180, 49, 24, -1, $WS_EX_CLIENTEDGE)
$T1Mobile = GUICtrlCreateInput("Mobil", 403, 210, 113, 24, -1, $WS_EX_CLIENTEDGE)
$T1Fax = GUICtrlCreateInput("FAX", 403, 240, 113, 24, -1, $WS_EX_CLIENTEDGE)
$T1SaveFields = GUICtrlCreateButton("Save Fields", 450, 320, 120, 30)
$NewRecordBtn = GUICtrlCreateButton("Add New Record", 450, 282, 120, 30)


$TabFamily = GUICtrlCreateTabItem("Family")
$T2name = GUICtrlCreateInput("(Name) Maiden-Last", 20, 30, 141, 24, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetState($T2name, $GUI_FOCUS)
$T2Combo = GUICtrlCreateCombo("", 170, 30, 151, 200)
$T2Spouse = GUICtrlCreateInput("Spouse/Partner (Fname Lname)", 20, 60, 181, 24, -1, $WS_EX_CLIENTEDGE)

As you can see, each handle has a definite relationship to the form or the control it is the handle of. Someone else has been posting recently about the difficulty of handle naming when you have multiple forms/screens. So far I've been using tabs to aleviate the need for multiple forms/screens, but that won't last. Even when I'm a hundred or more lines away from the code listed above, I still know what those handles refer to. I wish I had more time for this response.

Note "$ScreenTitle = GUICreate($sScreenTitle" See how the handle name is similar but different from the content variable, with that type of naming scheme the variables are "typed, relate to the form/control, and are not likely to be confused".

I'm not saying that you should follow my scheme, although I think that would be useful to many people, but I am saying that you should be thinking about these issues. I don't know how many other people rename the handles, but I bet I'm not the only one.

I'm out of time. Please consider this thoughtfully!

:oB)

Edited punctuation, and typos...

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Uploaded new build which fixes a few bugs and a few new small changes :

If form has been modified then when removing form or when Koda exits you will be

notified of such so there should be no accidental loss of work.

@CatchFish, I found the bug you mentioned about form name not being inserted properly, this happens when double clicking on *.kxf file to open into Koda. Not fixed in this build but will be soon. Thanks for pointing this out...

Edited by lookfar
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...