Jump to content
Sign in to follow this  
Lazycat

GUI Designer: Koda 1.7.3.0

Recommended Posts

I'm tried to recreate form from your code, but no problem found. It's need I'm be able to represent error in order to fix it...

Agreed, I have been unable to recreate this error. It happens once in awhile when I try to save a GUI for the first time. As a quick fix, I always save the GUI first, before editing it at all. If it doesn't give me the error on the first save, then it won't give the error later on. Other times, no matter how oftern I try, I cannot save some GUIs.

Share this post


Link to post
Share on other sites

Little bugs in Koda 1.6.0.2

- open existing KXF form

- resize main GUI (by mouse)

here is first problem that value of Width property is not changed.

- now close form

here is second problem that save dialog didn't appear even if I change value of Width property mannually.

Edited by Zedna

Share this post


Link to post
Share on other sites

Agreed, I have been unable to recreate this error. It happens once in awhile when I try to save a GUI for the first time. As a quick fix, I always save the GUI first, before editing it at all. If it doesn't give me the error on the first save, then it won't give the error later on. Other times, no matter how oftern I try, I cannot save some GUIs.

Really strange bug, I'm never represent it myself. The only thing that once prevented saving - nasty bug with config file, but since it fixed and you deleted old config file, this should not appear again...

here is first problem that value of Width property is not changed.

Yes, this known problem, but no solution yet :whistle:

here is second problem that save dialog didn't appear even if I change value of Width property mannually.

Don't sure I understand correctly. Changing width/height form in property inspector activate save button, and it's save ok.

Share this post


Link to post
Share on other sites

Yes, this known problem, but no solution yet ;)

Don't worry :whistle: it's not big problem only cosmetics...

Don't sure I understand correctly. Changing width/height form in property inspector activate save button, and it's save ok.

I meant close Koda (Alt+F4) when there is unsaved changed form (due to its changed width). Now should occur Save dialog:

Warning

Form has been modified. Save form before removing?

Share this post


Link to post
Share on other sites

Hi lzycat

I have found a error in koda 1.6.0.2 an GUICtrlCreateLabel

is does not save the size of the box

so when you reload it changes the size thanks beau

Share this post


Link to post
Share on other sites

Hi lzycat

I have found a error in koda 1.6.0.2 an GUICtrlCreateLabel

is does not save the size of the box

so when you reload it changes the size thanks beau

Don't think this is an error: try to set label property "AutoSize" to "False"...

Share this post


Link to post
Share on other sites

Don't think this is an error: try to set label property "AutoSize" to "False"...

thanks lazycat that did it one quick question is there a button for GUICtrlSetData koda thanks beau Edited by n9mfk9

Share this post


Link to post
Share on other sites

thanks lazycat that did it one quick question is there a button for GUICtrlSetData koda thanks beau

There is no "button" for GUICtrlSetData. Controls have some property for generating Data content: for example, Input control have "Text" property, List - "Items" etc. Look in the help file, there every property meaning for each control is explained.

Share this post


Link to post
Share on other sites

When I setup $DTS_SHORTDATEFORMAT style in Object Inspector for Date Picker control then this style is missing in generated code for GUICtrlCreateDate()

This style is zero, it's have not meaning when BitOr'ing, so it not generating. Here remain only $WS_TABSTOP which is default.

Share this post


Link to post
Share on other sites

This style is zero, it's have not meaning when BitOr'ing, so it not generating. Here remain only $WS_TABSTOP which is default.

Hi Lazycat. I'm pleased to see you back here :D

Unfortunatelly you are not right. Look at this example:

#include <GUIConstants.au3>
Global Const $DTM_SETFORMAT = 0x1005

$Form1 = GUICreate("Test", 300, 200)
$dt_date1 = GUICtrlCreateDate("", 50, 50, 200, 21); implicitly long format
$dt_date2 = GUICtrlCreateDate("", 50, 100, 200, 21, $DTS_SHORTDATEFORMAT)
GUISetState(@SW_SHOW)

While 1
    Switch GuiGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

As you can see implicit format is long. So when needed short format it must be explicitly declared.

OT: Now i broke my nice posts number :P

EDIT:

You are right about this:

Global Const $DTS_SHORTDATEFORMAT = 0

Global Const $DTS_LONGDATEFORMAT = 4

But here is my result:

post-6483-1165957905_thumb.png

Edited by Zedna

Share this post


Link to post
Share on other sites

As you can see implicit format is long. So when needed short format it must be explicitly declared.

EDIT:

You are right about this:

Global Const $DTS_SHORTDATEFORMAT = 0

Global Const $DTS_LONGDATEFORMAT = 4

But here is my result:

post-6483-1165957905_thumb.png

I see nothing wrong here. First control is in long format, second - in short.

As in the Autout manual:

default (-1) : $DTS_LONGDATEFORMAT
forced style : $WS_TABSTOP

Long date format is default. When you set something as style, you override default value, and result style will be forced one BitOr'ed with overriding style. In this case, no matter what set as style: 0 (DTS_SHORTDATEFORMAT) or WS_TABSTOP. Result remain the same.

Share this post


Link to post
Share on other sites

I see nothing wrong here. First control is in long format, second - in short.

As in the Autout manual:

default (-1) : $DTS_LONGDATEFORMAT
forced style : $WS_TABSTOP

Long date format is default. When you set something as style, you override default value, and result style will be forced one BitOr'ed with overriding style. In this case, no matter what set as style: 0 (DTS_SHORTDATEFORMAT) or WS_TABSTOP. Result remain the same.

Problem is in this default value in AutoIt (which is not zero). Due to this default value is needed setup $DTS_SHORTDATEFORMAT in generated code from Koda (no matter it's zero as you correctly said). Edited by Zedna

Share this post


Link to post
Share on other sites

Zedna, am I correct in thinking you want the style to be explicitly specified not for functional reasons but simply so the code is self-documenting?

Share this post


Link to post
Share on other sites

Zedna, am I correct in thinking you want the style to be explicitly specified not for functional reasons but simply so the code is self-documenting?

No.

I have project (new version of my Log_View) where I need Date control with short date format.

When I setup this style in Koda (in KXF form) then in generated AU3 code is that style missing and AutoIt aplies default long format.

So Everytime when I make some changes in my Koda project and generating new code I must add $DTS_SHORTDATEFORMAT format by hand to work correctly.

Edited by Zedna

Share this post


Link to post
Share on other sites

No.

I have project (new version of my Log_View) where I need Date control with short date format.

When I setup this style in Koda (in KXF form) then in generated AU3 code is that style missing and AutoIt aplies default long format.

So Everytime when I make some changes in my Koda project and generating new code I must add $DTS_SHORTDATEFORMAT format by hand to work correctly.

Zedna, I'm still not understand how this can be. When I setup this style, Koda generate $WS_TABSTOP as style. If I remove WS_TABSTOP from inspector, Koda generate 0. All as expected...

post-126-1166107397_thumb.png

Share this post


Link to post
Share on other sites

Zedna, I'm still not understand how this can be. When I setup this style, Koda generate $WS_TABSTOP as style. If I remove WS_TABSTOP from inspector, Koda generate 0. All as expected...

You are right.

Indeed WS_TABSTOP prevent from this default long date format.

Now I see. I didn't notice this 0 as style - maybe it should be $DTS_SHORTDATEFORMAT instead 0.

Because I didn't see $DTS_SHORTDATEFORMAT there I always corrected it by hand.

EDIT: so sorry guys for my mistakes :P

Edited by Zedna

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
Sign in to follow this  

×
×
  • Create New...