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

clientwidth of tabpages, wtf?

 
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: Fri Dec 23, 2005 7:21 pm    Post subject: clientwidth of tabpages, wtf? Reply with quote

the client area of tabpage is screwed up.
if you remove the -7 from my code below, the listbox overlaps the tabpage.
Code:
$tab = $Tabs.TabPages.add($System.TabPage)
$tab.Text = "Connected Users"
$tab.Size = $Tabs.clientSize
$Label = $System.Label
$Label.size = $System.Size(100,19)
$Label.Location = $System.Point(2,10)
$Label.text = "Connected Users:"
$List = $System.ListBox
$List.Location = $System.Point(2,30)
$List.size = $System.Size($tab.clientWidth - 2*$List.Left - 7,80)

_________________
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: Fri Dec 23, 2005 8:37 pm    Post subject: Reply with quote

Have had the similar problems with Clientwidth/Height of Forms within KF2.
Had to substract certain numbers on certain circumstances when restoring stored form size and position on restart.

Dunno if I ever complained about that, is this still there ?

_________________
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: Fri Dec 23, 2005 9:02 pm    Post subject: Reply with quote

seems so.
but, with KF2 I never had to remove 7.
it was more like 1 or 2 pixels off.

_________________
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: Fri Dec 23, 2005 11:38 pm    Post subject: ClientSize of Tabs is screwed up. Reply with quote

Code:
;*************************************************************************
;  Script Name:   Server Monitor
;  Author:        Jooel
;  Date:          23.12.2005
;  Description:   The script where you can view the server state and change some settings and stuff.
;*************************************************************************
 
;Script Options
$SO=SETOPTION("CaseSensitive", "ON")
$SO=SETOPTION("HideCursor", "ON")
$SO=SETOPTION("NoMacrosInStrings", "ON")
$SO=SETOPTION("NoVarsInStrings", "ON")

$System = CreateObject("Kixforms.System")
$ServerMonitor = $System.Form
$ServerMonitor.Size = $System.Size(500,300)
;$ServerMonitor.FormBorderStyle = $System.FormBorderStyle_FixedSingle
$ServerMonitor.FormBorderStyle = $System.FormBorderStyle_FixedToolWindow
$ServerMonitor.Text = "Server Monitor and Config"

$ServerMonitor.show

$Tabs = $System.TabControl
$Tabs.size = $ServerMonitor.ClientSize
;$Tabs.dock = $system.dockstyle_fill

$tab = $Tabs.TabPages.add($System.TabPage)
$tab.Text = "Connected 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($tab.clientWidth - 2*$ListConnectedUsers.Left - 7,80)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Disconnect"
$Button.size = $System.Size(70,21)
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.Location = $System.Point(2,$ListConnectedUsers.bottom + 2)
$Button = $tab.controls.add($System.Button)
$Button.Text = "Disconnect All"
$Button.size = $System.Size(90,21)
$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"
$Button.FlatStyle = $System.FlatStyle_Flat
$Button.size = $System.Size(190,21)
$Button.Location = $System.Point(166,$ListConnectedUsers.bottom + 2)



$tab = $Tabs.TabPages.add($System.TabPage)
$tab.Text = "Shared Folders"
$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(200,$tab.clientHeight - 54)
$ListSharedFolders.Location = $System.Point(5,30)

$ = $ServerMonitor.Controls.add($tabs)

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



changing the line:
$ListSharedFolders.size = $System.Size(200,$tab.clientHeight - 54)
to:
$ListSharedFolders.size = $System.Size(200,$tab.clientHeight - 53)

or anything less overlaps the list.
so, from the tabClientHeight, there is 24 unusable pixels!!!!!!!!!

I just hope this is a bug in KF.net as if it's MS thingie, it will never be fixed.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET 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