KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Bug in FormBorderStyle

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Bert
KiXforms Regular
KiXforms Regular


Joined: 06 Oct 2003
Posts: 56
Location: Netherlands

PostPosted: Fri Jan 28, 2005 12:48 pm    Post subject: Bug in FormBorderStyle Reply with quote

Shawn,

When I use FormBorderStyle=4 before $form.show then the size of the form will be the size of the form of another kixforms program that I have run before.

The following kixlet will show the problem.

Code:

$Form = CreateObject('Kixtart.Form')
$Form.FormBorderStyle = 4
$form.show
while $form.visible
   $ = execute ($form.doevents())
loop


Run the code, resize the form and close the form. Then run the code again. The form will now have the size of the previous resized window.

Also the form is displayed on a wrong postion after $form.show.
If $form.top is 90 before $form.show it will be 42 after $form.show.

Every time I run the code the form is displayed higher on the screen.

Tested with 2.4.0.46 Devbld.

_________________
Bert

There are 10 kinds of people. Those who can count binary and those who can't.
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Fri Jan 28, 2005 1:11 pm    Post subject: Re: Bug in FormBorderStyle Reply with quote

Bert wrote:
Run the code, resize the form and close the form. Then run the code again. The form will now have the size of the previous resized window.

Also the form is displayed on a wrong postion after $form.show.
If $form.top is 90 before $form.show it will be 42 after $form.show.

Every time I run the code the form is displayed higher on the screen.


with the codelet you posted above this is no wonder. Where do you think should kixforms remember the size and the last position of that form if it is closed?

The Position of the form, if not explicitly assigned in the script, is set by your OS (or maybe some secret algorithm in kf Wink )

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Bert
KiXforms Regular
KiXforms Regular


Joined: 06 Oct 2003
Posts: 56
Location: Netherlands

PostPosted: Fri Jan 28, 2005 6:01 pm    Post subject: Re: Bug in FormBorderStyle Reply with quote

Jochen wrote:
Bert wrote:
Run the code, resize the form and close the form. Then run the code again. The form will now have the size of the previous resized window.

Also the form is displayed on a wrong postion after $form.show.
If $form.top is 90 before $form.show it will be 42 after $form.show.

Every time I run the code the form is displayed higher on the screen.


with the codelet you posted above this is no wonder. Where do you think should kixforms remember the size and the last position of that form if it is closed?

The Position of the form, if not explicitly assigned in the script, is set by your OS (or maybe some secret algorithm in kf Wink )


Did you test the code?

Did you test the code without the line $Form.FormBorderStyle = 4 ?

Then you would see the difference.

When the code is ended there should be no remembering of previous form sizes or positions.

With kixforms 2.3.0.42 the form has not this behaviour.
However the default width of the form is wider if the line $Form.FormBorderStyle = 4 is used then when it is not used.

_________________
Bert

There are 10 kinds of people. Those who can count binary and those who can't.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Jan 29, 2005 2:26 pm    Post subject: Reply with quote

hmmm, i dont see exactly what you are seeing - every-time i start the scriptlet you provided, it starts centered in the screen - if I resize then close and restart, it just starts centered again - always the same size.

There are system settings that DO control the size and location of unspecified windows (and windows does remember some state info), usually they are big (about 640,480) and they start in the upper left corner - then every time you create another unspecified window, Windows "cascades" them on your desktop - from top-left to bottom-right - but I am not seeing that right now.
Back to top
View user's profile Send private message
Bert
KiXforms Regular
KiXforms Regular


Joined: 06 Oct 2003
Posts: 56
Location: Netherlands

PostPosted: Wed Feb 02, 2005 12:12 pm    Post subject: Reply with quote

Shawn,

I changed the code a little to show more information. As you can see the properties are correct just before the $form.show and are changed just after the $form.show.

Code:

$Form = CreateObject('Kixtart.Form')
$Form.FormBorderStyle = 4
? ? "top=" $form.top
? "left=" $form.left
? "height=" $form.height
? "width=" $form.width
$form.show
? "top=" $form.top
? "left=" $form.left
? "height=" $form.height
? "width=" $form.width
?
while $form.visible
   $ = execute ($form.doevents())
loop


Results are:

    top=335
    left=490
    height=300
    width=300
    top=226
    left=371
    height=450
    width=625


I am using KiXforms 2.4.0.46 Specialbuild 8

_________________
Bert

There are 10 kinds of people. Those who can count binary and those who can't.
Back to top
View user's profile Send private message
maciep
KiXforms Regular
KiXforms Regular


Joined: 01 May 2003
Posts: 43
Location: Pittsburgh,PA

PostPosted: Wed Feb 02, 2005 1:31 pm    Post subject: Reply with quote

I ran your code with these results

Quote:

top=324
left=490
height=300
width=300
top=324
left=490
height=300
width=300
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Feb 02, 2005 2:14 pm    Post subject: Reply with quote

and you ran this with what build on what OS ?
I somehow miss these important informations throughout the whole thread Rolling Eyes

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
maciep
KiXforms Regular
KiXforms Regular


Joined: 01 May 2003
Posts: 43
Location: Pittsburgh,PA

PostPosted: Wed Feb 02, 2005 5:41 pm    Post subject: Reply with quote

i missed them too Very Happy

Actually ran it on

Kixforms Version 2.3.0 RC3 Build 45
Win XP SP1
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Thu Feb 03, 2005 9:53 am    Post subject: Reply with quote

Now we're talking Smile

running this with kf 2.4.0.46 (Special build 18 ) on W2K SP4 launched with KiX32.exe 4.5 Alpha build 2 the results are :

Code:

top=220
left=362
height=300
width=300
top=220
left=362
height=300
width=300

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group