You must to be more explicit ... where is the problem ? you are lauching the MainForm and then you call ... StatForm ?
where is the code of the widget you want to be active ? which one ? is it a dynamiquely created widget ? You have an incredibely too complex code ... for a Gambas one... why there is a need to store all the label instances ? can't you use a .Tag index ? 2014/1/3 VonZorch <vonzo...@gmail.com>: > My archivers are being balky, I couldn't send the entire project. What > follows is the class files for the main form and the opened form. > > ' Gambas class file frmMain > > Private Names As String[] > Private Stats As New FrmStat[] > Private strHtQ[2] As String > Private strWtQ[2] As String > Private Hx As String[] > Private Wx As String[] > > > Public Sub _new() > Dim Loop1 As Byte > Dim Loop2 As Byte > Dim Base As Byte = 50 > Dim NewStat As FrmStat > Names = > Split("STR,CON,DFT,AGL,SPD,INT,WILL,APR,EMP,VOI,CHA,TEK,SCI,PIO,RWA,MCA,EST,PSI,MAG") > For Loop1 = 0 To 18 > If Loop1 > 16 Then Base = 0 > NewStat = New FrmStat(Names[Loop1], Base, Loop1, TabStrip1) > Stats.Add(NewStat) > Stats[Loop1].X = 0 > Stats[Loop1].Y = (Loop1 + 1) * 23 > If Names[Loop1] = "INT" Then Stats[Loop1].CostX = 2 > If Loop1 > 16 Then Stats[Loop1].ULimit = 50 > If Loop1 = 17 Then Stats[Loop1].LLimit = -50 > Next > cmbRace.Index = 1 > strHtQ[0] = "2,172" > strHtQ[1] = "2,166" > spnSize_Change() > End > > Public Sub Form_Open() > End > Public Sub StatChanged(Index As Byte) > > > > End > > Public Sub UpdateCost() > Dim Cost As Integer > Dim Loop1 As Byte > For Loop1 = 0 To 16 > Cost += Stats[Loop1].Cost > Next > lblCost.Text = Cost > lblPointsLeft.Text = lblPoints.Text - lblCost.Text > If Val(lblPointsLeft.Text) < 0 Then > lblPointsLeft.Foreground = Color.Red > Else > lblPointsLeft.Foreground = Color.Black > Endif > End > > Public Sub spnSize_Change() > Dim Ht As Float > Dim S As Byte = cmbSex.Index > Dim HH As String > Hx = Split(strHtQ[S]) > Ht = Round((spnSize.Value / Hx[0]) + Hx[1], -1) > vbxMetricHT.Value = Ht > tbxFeet.Text = Conversions.cm2Ft(Ht, 1) > End > > Public Sub btnCurve_Click() > frmCurve.Show > End > > frmCurve.Class > ' Gambas class file > > Private Ht As Float[] > Private Wt As Float[] > Public lblHt As New Label[] > Public lblWt As New Label[] > > Public Sub _new() > Dim Loop1 As Byte > Dim This As Label > This = New Label(Me) > This.X = 0 > This.Y = 660 > This.Width = 35 > This.Height = 21 > This.Text = "0" > This.Alignment = Align.Right > lblHt.Add(This, 0) > This = New Label(Me) > This.X = 0 > This.Y = 21 > This.Width = 35 > This.Height = 21 > This.Alignment = Align.Right > This.Text = "10" > lblHt.Add(This, 10) > This = New Label(Me) > This.X = 677 > This.Y = 0 > This.Width = 35 > This.Height = 21 > This.Alignment = Align.Center > This.Text = "10" > lblHt.Add(This, 10) > Draw.Begin(drwPlot) > For Loop1 = 0 To 10 > This = New Label(Me) > This.X = 18 + (Loop1 * 66) > This.Y = 0 > This.Width = 35 > This.Height = 21 > This.Text = Str(Loop1) > This.Alignment = Align.Center > If Loop1 = 10 Then This.X = 677 > lblWt.Add(This, 0) > If Loop1 > 0 And Loop1 < 10 Then > This = New Label(Me) > This.X = 0 > This.Y = 670 - (Loop1 * 66) > This.Width = 35 > This.Height = 21 > This.Alignment = Align.Right > This.Text = Str(Loop1) > lblHt.Add(This, Loop1) > Draw.Line(0, Loop1 * 66, 660, Loop1 * 66) > Draw.Line(Loop1 * 66, 0, Loop1 * 66, 660) > Endif > Next > Draw.End > End > > > Public Sub Form_Open() > > Dim Loop1 As Integer > > > End > Private Sub btnPlot_Click() > Dim H As Float = (Ht[Ht.Count - 1] - Ht[0]) / 10 > Dim W As Float = (Wt[Wt.Count - 1] - Wt[0]) / 10 > Dim Loop1 As Byte > For Loop1 = 0 To 10 > lblHt[Loop1].Text = Str(Ht[0] + (H * Loop1)) > lblWt[Loop1].Text = Str(Wt[0] + (W * Loop1)) > Next > > > End > > Private Sub btnSet_Click() > Dim H As Float > Dim W As Float > If rbtEnglish.True Then > H = Conversions.Ft2CM(tbxHt.Text, 1) > W = Conversions.Lb2Kilo(vbxWt.Value, 1) > Else > H = Val(tbxHt.Text) > W = vbxWt.Value > Endif > Ht.Add(H) > Wt.Add(W) > vbxCount.Value = Ht.Count > tbxHt.Text = "" > vbxWt.Value = 0 > End > > I have breakpoints in every Sub, nothing catches. > > > > -- > View this message in context: > http://gambas.8142.n7.nabble.com/Controls-on-form-do-not-respond-tp44971p44990.html > Sent from the gambas-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user