#88455 - 2002-10-04 06:58 PM
Re: KiXforms 2.1 Preview - Computer Account Password Age
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Shawn - want a sneek peek at the code?
Also, a question about removing ListView items. I'm currently doing this to remove the ListView items:
code:
For Each $Item in $List.Items $Item.Remove Next
But, its rather clunky. Is there a way to remove all items in one fell swoop?
|
|
Top
|
|
|
|
#88456 - 2002-10-04 07:32 PM
Re: KiXforms 2.1 Preview - Computer Account Password Age
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Way ahead of you there bud ...
$list.items.clear $list.columns.clear $list.clear
plus, I've implemented another strategy from dotnet called
BeginUpdate EndUpdate
it freezes the drawing and rendering of any window while you are making an update, so for example, if you were to remove items the old way (is it an old way yet?" ... you would code this [this is freehand - sorry if typos]:
code:
$Form.BeginUpdate ' Freezes drawing For Each $Item In $List.Items $Item.Remove Next $Form.EndUpdate ; resume drawing
This technique make a major difference in performance. In fact, even with the $list.items.remove method, it still helps it to speed along. As well, Begin/EndUpdate should find other uses as well ... for example, when building dropdown windows (windows that expand down or sideways to expose hidden controls) ... should help to boost the look-and-feel there - you know - freeze drawing/ expand-draw controls / resume drawing kinda thingy.
[ps - i already sent you an email asking for the code ] [ 04. October 2002, 19:36: Message edited by: Shawn ]
|
|
Top
|
|
|
|
#88457 - 2002-10-04 07:43 PM
Re: KiXforms 2.1 Preview - Computer Account Password Age
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Aren't you always 1 (or 2, 3, or more) step(s) ahead of us? I assume that those methods aren't in the build (35) that I have? I think I may have even tried one or two of them.
Oh, look at this behaviour in SpinButton:
code:
$Filter = $Form.TextBox $Filter.Left = $Domains.Right + 32 $Filter.Top = 10 $Filter.Size = 35,20 $Filter.Locked = 1 $Filter.ToolTip = "Change the password age search filter" $Spin = $Form.SpinButton(1) $Spin.Top = 10 $Spin.Left = $Filter.Right - 1 $Spin.Size = 20,20 $Spin.Min = 0 $Spin.Max = 999 $Spin.Value = 90 $Spin.ToolTip = "Change the password age search filter" $Spin.OnChange = "Spin_Change()" $Filter.Text = $Spin.Value Function Spin_Change() $Filter.Text = $Spin.Value EndFunction
When I 'hold' the spin button down, it increments along at a good pace. Then, the textbox value stops updating, but the spinbox value keeps incrementing. But the textbox value doesn't update after I 'let go' of the spin button until I push the spinbutton again.
|
|
Top
|
|
|
|
#88458 - 2002-10-04 07:44 PM
Re: KiXforms 2.1 Preview - Computer Account Password Age
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
oh yeah, and
code:
$list.focuseditem.remove
$list.selecteditems.clear
the list and permutations will be endless.
how about this one (after view constructor)
code:
$list = $form.listview()
$list.columns.count = 10
That one should be already there.
-Shawn
How about this to create items that are already in a slected state:
code:
$list.selecteditems.add("Kixtart")
Cripes - I better cracking if I'm going to make ot for tomorrow. [ 04. October 2002, 19:47: Message edited by: Shawn ]
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|