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

the locations are all screwed up in KF .net current build.
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 12:13 pm    Post subject: the locations are all screwed up in KF .net current build. Reply with quote

in KF .net I have complained about measurements being off many times but now, after a reboot and clean installation of the MSI, I have the newist build, right?

so, I opened my newist script and here it what it shows.
see how far from the bottom of the listbox the closest button is.
and then at the right side, the two buttons are almost next to the listbox.
like their should be.

and for you XP boys to try on your system, here is the code:
Code:
;*************************************************************************
;  Script Name:   Server Monitor
;  Author:        Jooel
;  Date:          23.12.2005 - 28.12.2005
;  Description:   The script where you can view the server state and change some settings and stuff.
;*************************************************************************
 
;Script Options
If not IsDeclared($SO_KF_BASE)
   $SO=SetOption("CaseSensitive", "ON")
   $SO=SetOption("HideCursor", "ON")
   $SO=SetOption("NoMacrosInStrings", "ON")
   $SO=SetOption("NoVarsInStrings", "ON")
   $System = CreateObject("Kixforms.System")
   Global $SO_KF_BASE
EndIf



$ServerMonitor = $System.Form
$ServerMonitor.Size = $System.Size(500,200)
$ServerMonitor.Font = $System.Font("",8,0)
$ServerMonitor.FormBorderStyle = $System.FormBorderStyle_FixedToolWindow
$ServerMonitor.Text = "Server Monitor and Config"

$Tabs = $ServerMonitor.Controls.add($System.TabControl)
$Tabs.size = $ServerMonitor.ClientSize
$Tabs.appearance = $System.TabAppearance_FlatButtons

$tab = $Tabs.TabPages.add($System.TabPage)
$tab.Text = "Users"
$tab.Size = $Tabs.clientSize
$Label = $tab.controls.add($System.Label)
$Label.size = $System.Size(100,19)
$Label.Location = $System.Point(2,10)
$Label.text = "Connected Users:"
$ListConnectedUsers =  $tab.controls.add($System.ListBox)
$ListConnectedUsers.Location = $System.Point(2,30)
$ListConnectedUsers.size = $System.Size(200,80)
$Label = $tab.controls.add($System.Label)
$Label.size = $System.Size(100,19)
$Label.Location = $System.Point($ListConnectedUsers.Right + 5,10)
$Label.text = "Offline Users:"
$ListOfflineUsers =  $tab.controls.add($System.ListBox)
$ListOfflineUsers.Location = $System.Point($ListConnectedUsers.Right + 5,30)
$ListOfflineUsers.size = $System.Size(200,80)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Disconnect"
$Button.Click = "DoDisconnect"
$Button.size = $System.Size(70,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point(2,$ListConnectedUsers.bottom + 2)

$Button = $tab.controls.add($System.Button)
$Button.Text = "Disconnect All"
$Button.Click = "DoDisconnectAll"
$Button.size = $System.Size(90,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point(74,$ListConnectedUsers.bottom + 2)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Stop Listening for new connections" ;StartStopListening UDF has code for changing the text to resume and shit.
$Button.click = "DoStartStopListening"
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.size = $System.Size(190,19)
$Button.Location = $System.Point(2,$ListConnectedUsers.bottom + 30)

$Button = $tab.controls.add($System.Button)
$Button.Text = "Remove"
$Button.Click = "DoRemoveUser"
$Button.size = $System.Size(70,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point($ListOffLineUsers.Right + 2,30)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Add ..."
$Button.Click = "DoAddUser"
$Button.size = $System.Size(70,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point($ListOffLineUsers.Right + 2,53)



$tab = $Tabs.TabPages.add($System.TabPage)
$tab.Text = "Sharing"
$tab.Size = $Tabs.clientSize
$Label = $tab.controls.add($System.Label)
$Label.size = $System.Size(100,19)
$Label.Location = $System.Point(5,10)
$Label.text = "Shared Folders:"
$ListSharedFolders = $tab.controls.add($System.ListBox)
$ListSharedFolders.size = $System.Size(350,$tab.clientHeight - 54)
$ListSharedFolders.Location = $System.Point(5,30)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Remove"
$Button.Click = "DoRemoveSharedFolder"
$Button.size = $System.Size(70,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point($ListSharedFolders.Right + 4,30)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Add ..."
$Button.Click = "DoAddSharedFolder"
$Button.size = $System.Size(70,19)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point($ListSharedFolders.Right + 4,53)


$ServerMonitor.show


While $servermonitor.visible
   $ = Execute($System.application.Doevents)
Loop



kfNetScrewed.jpg
 Description:
Example of height measurement being way off
 Filesize:  13.62 KB
 Viewed:  900 Time(s)

kfNetScrewed.jpg



_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 12:27 pm    Post subject: Reply with quote

btw, I tested so far that it's not about Point.
nor it's about BOTTOM or TOP being off.

printed out some stuff after creation of the button:
Code:
$ListConnectedUsers.bottom + 2 ?
$Button.Top ?

they both gave 112 as they should.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Dec 28, 2005 1:00 pm    Post subject: Reply with quote

I just ran your snippet on my machine - all looks good. I there still an issue ?
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 2:37 pm    Post subject: Reply with quote

I re-installed .net 1.1 sp1 but that didn't solve this.

yes, there is still issue.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 2:39 pm    Post subject: Reply with quote

oh, and this looks lot like the issue I posted before about listbox overlapping inside tabpage.
there seems to be something wrong in the bottom edge of listbox.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Wed Dec 28, 2005 3:01 pm    Post subject: Reply with quote

i think that the problem might be with the visible size of the listbox. i added
Code:
$ListConnectedUsers.borderstyle = 1

and the visible size changed to agree with the placement of the disconnect/disconnect all buttons.



form.JPG
 Description:
 Filesize:  15.8 KB
 Viewed:  883 Time(s)

form.JPG



_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
Jochen
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Wed Dec 28, 2005 3:03 pm    Post subject: Reply with quote

Just ran the script on my system (W2K SP4 .Net FW 2.0) and it showed up the same as in the screenshot.

One thing to ask: Isn't it quite bad to name ALL buttons $Button or did I miss the point ?

Oh and yes, listbox' bottom is 110 and buttons top is 112 but the distance looks more like 15 or so Confused

_________________
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
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 3:04 pm    Post subject: Reply with quote

hmmm...
nice.
but, what's that lower empty space there then?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Wed Dec 28, 2005 3:05 pm    Post subject: Reply with quote

Nice catch Benny.

It sure should be limited to the actual Size of the control.

_________________
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
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 3:06 pm    Post subject: Reply with quote

jochen, you missed the point with the buttons.
I never need them again, right?
so, why would I want to have the pointer to them?
the button var is just a shortcut pointer I use when I create them.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Wed Dec 28, 2005 3:07 pm    Post subject: Reply with quote

The lower empty space is resulting from

$Button.Location = $System.Point(2,$ListConnectedUsers.bottom + 30)
while the height of the upper button is only 19, is it ?

[edit] ok, got the point with the buttons ... it was just irritating[/edit]

_________________
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
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 3:11 pm    Post subject: Reply with quote

no jochen.
the line you look is for the third button that in my image does not show almost at all anymore.
the size of the tab is 200 in height and this would make the button start in 110+30, that is 140.
and if the button is 19 high, it would end at 159.
then, there is still about 40 pixels empty after the button.
I mean, should be.
as you can see, kixforms somehow fails to draw it.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Wed Dec 28, 2005 3:17 pm    Post subject: Reply with quote

Oh you meant the empty space below the second button, not the space between first and second ... well, as the form wasn't resizable I couldn't see that 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
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Dec 28, 2005 3:17 pm    Post subject: Reply with quote

irritating?
hmm...

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


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

PostPosted: Wed Dec 28, 2005 3:18 pm    Post subject: Reply with quote

ja
_________________
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 -> KiXforms.NET Discussion All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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