• Status Researching
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Application
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version 1.7.2.0
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Anonymous Submitter - 13.01.2010
Last edited by Admin - 03.02.2010

FS#89 - Wrong form height in the generated code

If a dialog form is created with the certain style bits (s. below) in Koda the window height in the generated AutoIt code is set to ClientHeight + 1 instead of Height which cuts off a stripe of the height of the window’s title bar (mostly 26 px) at the bottom of the form at the time is displayed from the script.

Example as followed.

SampleDialog.kxf

<object type="TAForm" name="dlgTest">
	<properties>
		<property name="Left" vt="Int16">1626</property>
		<property name="Top" vt="Int16">262</property>
		<property name="Width" vt="Int16">321</property>
		<property name="Height" vt="Int16">407</property>
		<property name="Caption" vt="String">Sample Dialog</property>
		<property name="Color" vt="Ident">clBtnFace</property>
		<property name="Font.Charset" vt="Ident">DEFAULT_CHARSET</property>
		<property name="Font.Color" vt="Ident">clWindowText</property>
		<property name="Font.Height" vt="Int8">-11</property>
		<property name="Font.Name" vt="String">MS Sans Serif</property>
		<property name="Font.Style" vt="Set"/>
		<property name="OldCreateOrder" vt="False">False</property>
		<property name="Position" vt="Ident">poDesktopCenter</property>
		<property name="ParentForm" vt="String">owner</property>
		<property name="Style" vt="Int32">273154176</property>
		<property name="ExStyle" vt="Int8">0</property>
		<property name="Version" vt="String">1.04</property>
		<property name="PixelsPerInch" vt="Int8">96</property>
		<property name="TextHeight" vt="Int8">13</property>
	</properties>
</object>

SampleDialog.au3 (generated)

#Region ### START Koda GUI section ### Form=SampleDialog.kxf
    Local $dlgTest = GUICreate("Sample Dialog", 314, 374, -1, -1, BitOR($WS_SYSMENU,$WS_DLGFRAME,$DS_MODALFRAME), 0, $owner)
#EndRegion ### END Koda GUI section ###

As far as I evaluated this concerns only (modal) dialog frames with system menu but without minimize/maximize boxes, normal overlapped windows are not affected though their heights are also set to ClientHeight. It may be the strange way AutoIt’a GUICreate() works but I think Koda should reflect its behavior even if it’s inconsistent.

Admin
Admin commented on 03.02.2010 22:39

I think this is because WS_CAPTION style absent. I found that Koda generating window without caption in wrong position: it should be lower by caption height, because Koda show caption in any case (you can’t move window instead).

But this is indeed strange behaviour when DS_MODALFRAME exists.

len commented on 11.04.2010 23:22

WS_CAPTION is missing also when setting
will have missing
$Form1 = GUICreate("Form1", 105, 37, 377, 224, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_TABSTOP))</code>

Martin Gibson commented on 29.05.2011 23:04

The gui height is also incorrect in AutoIt code when there is a main menu. I think the client height is reduced by the ht of the menu bar but this is not allowed for in Koda perhaps.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing