#87804 - 2002-09-13 01:35 PM
KiXforms 2.0.4 Released
|
rclarke
Starting to like KiXtart
Registered: 2001-06-08
Posts: 178
Loc: Oxfordshire, United Kingdom.
|
On behalf of Shawn, I would like to announce that KiXforms 2.0.4 is now available for download from the KiXforms website. Please check the release notes on the web site and the zipped release.txt file for details of added functionality and bug fixes.
Regards,
Rod.
|
Top
|
|
|
|
#87805 - 2002-09-13 01:51 PM
Re: KiXforms 2.0.4 Released
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
There is no documentation attached with this release so i'm guessing it hasn't been written yet (those always gets behind).
Hasn't tested this one yet, but sounds pretty good.
|
Top
|
|
|
|
#87807 - 2002-09-13 02:16 PM
Re: KiXforms 2.0.4 Released
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
That's understandable
|
Top
|
|
|
|
#87809 - 2002-09-13 02:48 PM
Re: KiXforms 2.0.4 Released
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
I'll be posting some scripts today to demonstrate and test some of the new features and fixes in build 32 (2.0.4). This script leverages two new PROPERTIES:
TABGROUP BUILD
It presents a "menu" of four option buttons - you can only select one of them ... but if you click the button - the script will partition the four option buttons into two groups of two - at which point you can select one from each of the groups. This script doesn't use frames.
TABGROUP.KIX
code:
; ; KIXTART 4.0 ; KIXFORMS BUILD 32 ; Break On $Form = CreateObject("Kixtart.Form") If Val($Form.Build) < 32 ?"This script requires Kixforms Build 32" Quit() EndIf $Form.FontSize = 10 $Form.Size = 250,300 $Label = $Form.Label $Label.Size = 230,20 $Label.Location = 5,15 $Label.FontBold = 1 $Label.Text = "I WANT MORE" $Label.Alignment = 2 $Label.BackColor = 255,255,255 $Opt1 = $Form.RadioButton("Pizza") $Opt1.Top = $Label.Bottom + 20 $Opt1.Left = 20 $Opt1.Value = TRUE $Opt2 = $Form.RadioButton("Sex") ;$Opt2.Size = 100,20 $Opt2.Top = $Opt1.Bottom + 8 $Opt2.Left = 20 $Opt3 = $Form.RadioButton("Beer") $Opt3.Top = $Opt2.Bottom + 8 $Opt3.Left = 20 $Opt4 = $Form.RadioButton("Money") $Opt4.Top = $Opt3.Bottom + 8 $Opt4.Left = 20 $Button = $Form.Button("Come On!!!") $Button.Center $Button.Top = $Opt4.Bottom + 20 $Button.OnClick = "Click()" Function Click() ; Exit if button text set to "Exit" If $Button.Text = "Exit" Quit() EndIf ; Change our message ... $Label.FontSize = 10 $Label.Text = "OK, OK, I WANT MORE" ; Set Option 3 as the start of a new option group ... $Opt3.TabGroup = TRUE ; ; Now re-initialize option values ... ; $Opt1.Value = 1 $Opt2.Value = 0 $Opt3.Value = 1 $Opt4.Value = 0
; Draw some boxes to seperate our new options ; groups - look ma, no frames. $Form.Rectangle(15,50,210,75) $Form.Rectangle(15,124,210,75) ; Set button to exit on next go-around ... $Button.Text = "Exit" EndFunction $Form.Center $Form.Show While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1
-Shawn [ 13. September 2002, 14:51: Message edited by: Shawn ]
|
Top
|
|
|
|
#87810 - 2002-09-13 02:59 PM
Re: KiXforms 2.0.4 Released
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
A special note about the new BUILD property. It returns a number value indicating the current incremental release build of the object. It can be used to check a couple of things ... both at the same time.
Used like this, it can test to see if the latest build is installed:
code:
If $Form.Build < 32 ?"Kixforms build not current" Quit() EndIf
But ... if Kixforms isn't installed on the platform, what happens then. Well - a more clever way of using this feature may be to add the VAL() function into the mix, like this:
code:
If Val($Form.Build) < 32 ?"Kixforms not installed or build not current" Quit() EndIf
This catches both Kixforms not installed (an invalid $Form handle) and build not current.
|
Top
|
|
|
|
#87811 - 2002-09-13 04:53 PM
Re: KiXforms 2.0.4 Released
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Just a bit more on option groups (tab groups) ... this example uses them in a more practical fashion ... like with those "wizard" dialogs, that have a whole whack of option buttons on them ...
TABGROUP2.KIX
code:
; ; KIXTART 4.0 ; KIXFORMS BUILD 2.0.4.32 ; Break On $Form = CreateObject("Kixtart.Form") $Form.FontSize = 10 $Form.Size = 250,335 $Form.ForeColor = 0,0,200 $Form.PrintXY(10,30,"Please choose a color:") $RedOption = $Form.OptionButton $RedOption.Text = "Red" $RedOption.Top = 60 $RedOption.Left = 20 $RedOption.TabGroup = TRUE $RedOption.ForeColor = 200,0,0 $GreenOption = $Form.OptionButton $GreenOption.Text = "Green" $GreenOption.Top = $RedOption.Bottom + 5 $GreenOption.Left = 20 $GreenOption.ForeColor = 0,200,0 $Form.PrintXY(10,140,"Please choose a number:") $OneOption = $Form.OptionButton $OneOption.Text = "One" $OneOption.Top = 170 $OneOption.Left = 20 $OneOption.Value = TRUE $TwoOption = $Form.OptionButton $TwoOption.Text = "Two" $TwoOption.Top = $OneOption.Bottom + 5 $TwoOption.Left = 20 $Button = $Form.Button $Button.Text = "Exit" $Button.Center $Button.Top = 260 $Button.OnClick = "Click()" Function Click() Quit() EndFunction ; ; Initialize our options .. ; $RedOption.Value = TRUE $OneOption.TabGroup = TRUE $Form.Center $Form.Show While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1
|
Top
|
|
|
|
#87816 - 2002-09-13 06:24 PM
Re: KiXforms 2.0.4 Released
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Today is the first time I've attempted to use kixforms, and the beginning of a whole series of questions.
I am writing text to the main form, then I have an event that changes the text that is printed there. It is writing on top of the previous text, but not erasing it.
any ideas?? $form.refresh?? or will I have to put it into a box
|
Top
|
|
|
|
#87818 - 2002-09-13 07:12 PM
Re: KiXforms 2.0.4 Released
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
In one of the early alphas of forms (Lonkero helped quite a bit in evolving forms, remember Jooel?) ... the Form had a property called BACKSTYLE = 0/1 that made it so that when text was printed using PRINT (no PRINTXY at the time) it printed it in an OPAQUE fashion ... overwriting any bits that were already there.
Most times I keep forgetting (even to this day) that printing text directly on a form is really "painting" text on the form ... just like drawing a circle or a rectangle ... once graphics get on the form, they stay on the form, at least until (like you say) the form is CLEARED or the BACKCOLOR is changed (or reset to the same color).
Having said all that, the BACKSTYLE property is pending in 2.0.4 ... im reserving it for transparent controls (like the transparent frame) ... it was a poorly chosen name anyways because the proper name should have been "FontTransparent" ... but because a Moderator is raising this issue i will implement FontTransparent this weekend in 2.0.5.
I myself have been moving away from creating simple labels that hold only one line of text. Easier and faster to just laydown a PRINTXY to identify a caption-less control (like a TEXTBOX) ... why use the extra resources (memory) when you don't have to eh ? Having said that, if the text is complex or multi-line or has to be justified in some way - the LABEL is the only way to go. Plus if the text changes (even once) - the Label pays for itself.
But back to printing ... the way (it used to (and will again)) work is like this:
code:
$Form.FontTransparent = FALSE $Form.PrintXY(10,10,"Hello World") ; Now overwrite the text - tranparency is ; already turned off. ; ; Laydown a string of blanks - big enough to ; "cover-up" the largest string ; $Form.PrintXY(10,10," ") ; Hi $Form.PrintXY(10,10,"Hi !")
Something like that anyway. I'll add FontTransparent to the list for this weekend. [ 13. September 2002, 19:14: Message edited by: Shawn ]
|
Top
|
|
|
|
#87820 - 2002-09-13 07:34 PM
Re: KiXforms 2.0.4 Released
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
here is another...
is there a onchange event? I basically have a form (ripped from kix messenger) with about a half dozen text boxes on it (on the top half) and the 'output' painted on the bottom half of the form.
what I would like to have happen, is that as info gets typed into the text boxes, the bottom half dynamically updates... without having to press the 'former' send button
|
Top
|
|
|
|
#87822 - 2002-09-13 07:54 PM
Re: KiXforms 2.0.4 Released
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
hehee ... know exactly where your going with this question Rad ... funky-town !
Check-out the OnChange event:
code:
Break On $Form = CreateObject("Kixtart.Form") $Form.FontSize = 12 $Form.Size = 300,300 $TextBox1 = $Form.TextBox $TextBox1.Center $TextBox1.Top = 20 $TextBox1.OnChange = "TextBox_Change()" $TextBox2 = $Form.TextBox $TextBox2.Center $TextBox2.Top = $TextBox1.Bottom + 20 $TextBox2.OnChange = "TextBox_Change()" $TextBox3 = $Form.TextBox $TextBox3.MultiLine = TRUE $TextBox3.Size = $Form.ClientWidth-20,100 $TextBox3.Center $TextBox3.Top = $TextBox2.Bottom + 50 $Form.PrintXY(30,25,"To:") $Form.PrintXY(30,75,"About:") $Form.Center $Form.Show $TextBox1.SetFocus While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1 Function TextBox_Change() $TextBox3.Text = "Message to " + $TextBox1.Text + " about " + $TextBox2.Text + ". Lets do it!" EndFunction
|
Top
|
|
|
|
#87823 - 2002-09-13 08:12 PM
Re: KiXforms 2.0.4 Released
|
Bonji
Starting to like KiXtart
Registered: 2001-09-28
Posts: 169
Loc: Virginia
|
Shawn,
I'm experiencing an odd problem with a new feature in KixForms 2.0.4. When I utilize Sorted on a List it populates a different text field with a value from the list. I don't understand what it's doing at all. If I comment out the sorted line all works normally. I've updated the code on my site (Network Manager Script) so it can be replicated. I'm not sure what level of complexity is required to reproduce the problem.
Thanks, Ben http://www.rgcweb.org:90
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|