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

form-in-form?

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
masken
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 14 Mar 2003
Posts: 202
Location: Gothenburg, Sweden

PostPosted: Tue Mar 27, 2007 1:39 pm    Post subject: form-in-form? Reply with quote

Okay, I'll try and explain this hehe...

Let's say I have a regular rectangular form.

Let's say I want to use the bottom half to display alot of data in textboxes. This data would be too much to display with normal resolution.

Would it then be possible to make the bottom half of the form vertically scrollable, like a "form in a form" ? - ie, like if you'd have a listview with more items than what would fit in the form, but instead of a listview, form material?
Back to top
View user's profile Send private message MSN Messenger
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Mar 27, 2007 6:26 pm    Post subject: Reply with quote

See "SPLITTER"

There is some good directions on it's use at KORG in the learning forum.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
benny69
KiXforms Advocate
KiXforms Advocate


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

PostPosted: Tue Mar 27, 2007 6:51 pm    Post subject: Reply with quote

is this what you are looking for?

Code:

Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf

$Form = $System.Form()
$Form.StartPosition = 0  ;FormStartPosition_Manual
$Form.Size = $System.Size(600,400) ;(Width,Height)
$Form.Text = "Form1"

$ScrollBar = $System.VScrollBar()
$ScrollBar.Dock = $System.DockStyle_Right
$ScrollBar.Maximum = 50
$ScrollBar.Minimum = 0
$ScrollBar.ValueChanged = "VerticalScrolling()"
$nul = $Form.Controls.Add($ScrollBar)

$MainPnl = $System.Panel()
$MainPnl.Left = 0
$MainPnl.Top = 0
$MainPnl.Height = 500
$MainPnl.Width = 600
$nul = $Form.Controls.Add($MainPnl)

$Label = $System.Label()
$Label.BorderStyle = 1  ;FixedSingle
$Label.Left = 450
$Label.Text = "Label1"
$Label.Top = 350
$nul = $MainPnl.Controls.Add($Label)

$Form.Show  ;Displays the Form

While $Form.Visible
   $Nul = Execute($Form.DoEvents())
Loop
Exit 0

Function VerticalScrolling()
   $MainPnl.Top = 0 - $ScrollBar.Value
   $Form.Refresh
EndFunction

_________________
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
masken
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 14 Mar 2003
Posts: 202
Location: Gothenburg, Sweden

PostPosted: Wed Mar 28, 2007 4:23 pm    Post subject: Reply with quote

Splitter seems to the thing...

@benny, almost, I'd like the other form to fill let's say half of the main forms height.

Ie, 2 forms, both 600 high for example. Form2 is docked into Form1, and only 300 of Form2's height is viewable, docked into the lower half of Form1, the rest of Form2 is scrollable.
Back to top
View user's profile Send private message MSN Messenger
benny69
KiXforms Advocate
KiXforms Advocate


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

PostPosted: Wed Mar 28, 2007 8:08 pm    Post subject: Reply with quote

The label's are just to show you how many you can see on a 600 high panel, see if this is a little closer for you:
Code:

Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul = MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf

$Form = $System.Form()
$Form.StartPosition = 1  ;FormStartPosition_CenterScreen
$Form.Size = $System.Size(600,600)    ;(Width,Height)
$Form.Text = "Form1"

$TopGroupBox = $System.GroupBox()
$TopGroupBox.Dock = $System.DockStyle_Top
$TopGroupBox.Text = "Top GroupBox"
$TopGroupBox.Height = $Form.ClientHeight/2
$nul = $Form.Controls.Add($TopGroupBox)

$PnlPanel = $System.Panel()
$PnlPanel.BorderStyle = 1    ;FixedSingle
$PnlPanel.Top = $TopGroupBox.Bottom+4
$PnlPanel.Left = $TopGroupBox.Left
$PnlPanel.Text = "Bottom GroupBox"
$PnlPanel.Height = $Form.ClientHeight - $TopGroupBox.Bottom - 10
$PnlPanel.Width = $Form.ClientWidth
$nul = $Form.Controls.Add($PnlPanel)

$ScrollBar = $System.VScrollBar()
$ScrollBar.Dock = $System.DockStyle_Right
$ScrollBar.Maximum = 338
$ScrollBar.Minimum = 0
$ScrollBar.Step = 2
$ScrollBar.ValueChanged = "VerticalScrolling()"
$nul = $PnlPanel.Controls.Add($ScrollBar)

$BtmPnl = $System.Panel()
$BtmPnl.BorderStyle = 1    ;FixedSingle
$BtmPnl.Left = 0
$BtmPnl.Top = 0
$BtmPnl.Height = 600
$BtmPnl.Width = $PnlPanel.Width-6
$nul = $PnlPanel.Controls.Add($BtmPnl)

$Label = $System.Label()
$Label.BorderStyle = 1    ;FixedSingle
$Label.Left = 250
$Label.Text = "Label 1"
$Label.Top = 0
$nul = $BtmPnl.Controls.Add($Label)

$last = $Label.Bottom

For $i = 2 to 30
   $Label = $System.Label()
   $Label.BorderStyle = 1    ;FixedSingle
   $Label.Left = 250
   $Label.Text = "Label "+Val($i)
   $Label.Top = $last
   $nul = $BtmPnl.Controls.Add($Label)
   $last = $Label.Bottom
Next

$Form.Show    ;Displays the Form

While $Form.Visible
   $Nul = Execute($Form.DoEvents())
Loop
Exit 0

Function VerticalScrolling()
   $BtmPnl.Top = 0 - $ScrollBar.Value
   $Form.Refresh
EndFunction

_________________
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
masken
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 14 Mar 2003
Posts: 202
Location: Gothenburg, Sweden

PostPosted: Fri Mar 30, 2007 10:13 am    Post subject: Reply with quote

yes, that's more like what I'm looking for Smile Thanks for the example!
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
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