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

Listview and OnClick

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


Joined: 25 Apr 2006
Posts: 2

PostPosted: Tue Apr 25, 2006 11:13 pm    Post subject: Listview and OnClick Reply with quote

Onclick do not function when I click on one item ???

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

$Form2 = $System.Form()
$Form2.FormBorderStyle = 2 ;FormBorderStyle_Fixed3D
$Form2.StartPosition = 1 ;FormStartPosition_CenterScreen
$Form2.Size = $System.Size(610,436) ;(Width,Height)
$Form2.Text = "Web Interface"

$Panel1 = $System.Panel()
$Panel1.Dock = 5 ;Fill
$nul = $Form2.Controls.Add($Panel1)

$Panel2 = $System.Panel()
$Panel2.Dock = 5 ;Fill
$nul = $Panel1.Controls.Add($Panel2)

$RichTextBox1 = $System.RichTextBox()
$RichTextBox1.Dock = 5 ;Fill
$RichTextBox1.Text = "RichTextBox1"
$nul = $Panel2.Controls.Add($RichTextBox1)

$Splitter1 = $System.Splitter()
$nul = $Panel1.Controls.Add($Splitter1)

$Panel3 = $System.Panel()
$Panel3.Dock = 3 ;Left
$Panel3.Width = 99
$nul = $Panel1.Controls.Add($Panel3)

$ListView1 = $System.ListView()
$ListView1.Dock = 5 ;Fill
$ListView1.View = $System.View_Details
$ListView1.OnClick = "OnSelect()"
$nul = $Panel3.Controls.Add($ListView1)

$ListView1Column0 = $ListView1.Columns.Add($System.ColumnHeader("Web Interface",100,$System.HorizontalAlignment_Left))

$ListView1Item00 = $ListView1.Items.Add($System.ListViewItem("PFEBLA01"))
$ListView1Item01 = $ListView1.Items.Add($System.ListViewItem("PFEBLA02"))
$ListView1Item02 = $ListView1.Items.Add($System.ListViewItem("PFEBLF01"))
$ListView1Item03 = $ListView1.Items.Add($System.ListViewItem("PFEBLF02"))

$Form2.Show ;Displays the Form

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

Function OnSelect()
$MessageBoxForm1 = $System.MessageBox()
$Toto = $ListView1.SelectedItems.Item(0).Text
$DialogResult1 = $MessageBoxForm1.Show($Toto ,"Toi",0,4Cool

EndFunction


Merci....
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 Apr 25, 2006 11:28 pm    Post subject: Reply with quote

try changing

this line:
Code:

$ListView1.OnClick = "OnSelect()"


to:
Code:

$ListView1.Click = "OnSelect()"

_________________
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
alexou_soso
KiXforms Novice
KiXforms Novice


Joined: 25 Apr 2006
Posts: 2

PostPosted: Tue Apr 25, 2006 11:29 pm    Post subject: Reply with quote

Merci beaucoup...
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 Apr 25, 2006 11:32 pm    Post subject: Reply with quote

no problem, and welcome to KiXforms.org
_________________
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
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