Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Help on Table1.Cell,SelectedCol?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2008, 06:46 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 68
Default Help on Table1.Cell,SelectedCol?

Don't let the title confuse you.

What I have is a Table that has four Col with four Rows.
Each Col has one Cell that is a constant as do the Rows which corresponds with
the Col all other Cell in Col/Row are varibels.
Each Cell in one Col must equal or less then the constant or move on to the next
Col.
What I have now works great but I have to decipher between which of the four col that I need to use(no big deal to me).

What I would like to do is have PPC put the right Col In my hand without thinking about it.Like putting that information into four TextBox'es on a Form.

This is what I'm operating with now.

Code:
Sub ImageButtonGetPercent3_Click
TextBoxPercent100.Text=TextBoxHopper1.Text+TextBox Hopper2.Text+TextBoxHopper3.Text+TextBoxHopper4.Te xt
If TextBoxPercent100.Text=100 Then
Table1.Cell(
"A",0)=1026
Table1.Cell(
"B",1)=438
Table1.Cell(
"C",2)=140
Table1.Cell(
"D",3)=116
ImageButtonResin3.BringToFront
ImageButtonExitResin.BringToFront
InitializeConfigResin
Else Msgbox("Pecntage Must Equal 100%","",cMsgBoxOK,cMsgBoxHand)
End If
End Sub

Sub InitializeConfigResin

Table1.Cell(
"A",1)=(Table1.Cell("A",0)*TextBoxHopp er2.Text)/TextBoxHopper1.Text
Table1.Cell(
"A",2)=(Table1.Cell("A",0)*TextBoxHopp er3.Text)/TextBoxHopper1.Text
Table1.Cell(
"A",3)=(Table1.Cell("A",0)*TextBoxHopp er4.Text)/TextBoxHopper1.Text

Table1.Cell(
"B",0)=(Table1.Cell("B",1)*TextBoxHopp er1.Text)/TextBoxHopper2.Text
Table1.Cell(
"B",2)=(Table1.Cell("B",1)*TextBoxHopp er3.Text)/TextBoxHopper2.Text
Table1.Cell(
"B",3)=(Table1.Cell("B",1)*TextBoxHopp er4.Text)/TextBoxHopper2.Text

Table1.Cell(
"C",0)=(Table1.Cell("C",2)*TextBoxHopp er1.Text)/TextBoxHopper3.Text
Table1.Cell(
"C",1)=(Table1.Cell("C",2)*TextBoxHopp er2.Text)/TextBoxHopper3.Text
Table1.Cell(
"C",3)=(Table1.Cell("C",2)*TextBoxHopp er4.Text)/TextBoxHopper3.Text

Table1.Cell(
"D",0)=(Table1.Cell("D",3)*TextBoxHopp er1.Text)/TextBoxHopper4.Text
Table1.Cell(
"D",1)=(Table1.Cell("D",3)*TextBoxHopp er2.Text)/TextBoxHopper4.Text
Table1.Cell(
"D",2)=(Table1.Cell("D",3)*TextBoxHopp er3.Text)/TextBoxHopper4.Text

ButtonA2.Text=(Table1.Cell(
"A",1)/Table1.Cell("B",1))*100
ButtonA3.Text=(Table1.Cell(
"A",2)/Table1.Cell("C",2))*100
ButtonA4.Text=(Table1.Cell(
"A",3)/Table1.Cell("D",3))*100

ButtonB1.Text=(Table1.Cell(
"B",0)/Table1.Cell("A",0))*100
ButtonB3.Text=(Table1.Cell(
"B",2)/Table1.Cell("C",2))*100
ButtonB4.Text=(Table1.Cell(
"B",3)/Table1.Cell("D",3))*100

ButtonC1.Text=(Table1.Cell(
"C",0)/Table1.Cell("A",0))*100
ButtonC2.Text=(Table1.Cell(
"C",1)/Table1.Cell("B",1))*100
ButtonC4.Text=(Table1.Cell(
"C",3)/Table1.Cell("D",3))*100

ButtonD1.Text=(Table1.Cell(
"D",0)/Table1.Cell("A",0))*100
ButtonD2.Text=(Table1.Cell(
"D",1)/Table1.Cell("B",1))*100
ButtonD3.Text=(Table1.Cell(
"D",2)/Table1.Cell("C",2))*100

TextBoxSum1.Text=Table1.Cell(
"A",0)+Table1.Cell("",1)+Table1.Cell("A",2)+Table1.Cell("A",3)
TextBoxSum2.Text=Table1.Cell(
"B",0)+Table1.Cell("",1)+Table1.Cell("B",2)+Table1.Cell("B",3)
TextBoxSum3.Text=Table1.Cell(
"C",0)+Table1.Cell("",1)+Table1.Cell("C",2)+Table1.Cell("C",3)
TextBoxSum4.Text=Table1.Cell(
"D",0)+Table1.Cell("",1)+Table1.Cell("D",2)+Table1.Cell("D",3)
InitializeRound
End Sub

Sub InitializeRound

ButtonA2.Text=
Round(ButtonA2.Text,0)
ButtonA3.Text=
Round(ButtonA3.Text,0)
ButtonA4.Text=
Round(ButtonA4.Text,0)

ButtonB1.Text=
Round(ButtonB1.Text,0)
ButtonB3.Text=
Round(ButtonB3.Text,0)
ButtonB4.Text=
Round(ButtonB4.Text,0)

ButtonC1.Text=
Round(ButtonC1.Text,0)
ButtonC2.Text=
Round(ButtonC2.Text,0)
ButtonC4.Text=
Round(ButtonC4.Text,0)

ButtonD1.Text=
Round(ButtonD1.Text,0)
ButtonD2.Text=
Round(ButtonD2.Text,0)
ButtonD3.Text=
Round(ButtonD3.Text,0)

TextBoxSum1.Text=
Round(TextBoxSum1.Text,0)
TextBoxSum2.Text=
Round(TextBoxSum2.Text,0)
TextBoxSum3.Text=
Round(TextBoxSum3.Text,0)
TextBoxSum4.Text=
Round(TextBoxSum4.Text,0)

PanelGetResin.BringToFront
Form2.Show
End Sub
Reply With Quote
  #2 (permalink)  
Old 07-10-2008, 05:49 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 68
Default


All I need is help on how to call up the three cell's that are variables.Thats all.
In each Col.

Last edited by cdeane : 07-10-2008 at 05:52 PM.
Reply With Quote
  #3 (permalink)  
Old 07-10-2008, 06:33 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

What do you mean with "three cell's that are variables"? Can you give a small example?
Reply With Quote
  #4 (permalink)  
Old 07-10-2008, 07:25 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 68
Default

Table1.Cell=

ID A B C D
0 1026 0 0 0
1 0 438 0 0
2 0 0 140 0
3 0 0 0 116

All "0" are variables.

Col("A",0)'Is a Constant
Col("B",1)'Is a Constant
Col("C",2)'Is a Constant
Col("D",3)'Is a Constant

All "0" Increase or Decrease(variable)

I hope I'm right in the definition.

Last edited by cdeane : 07-10-2008 at 07:27 PM. Reason: Spacing
Reply With Quote
  #5 (permalink)  
Old 09-09-2008, 05:53 PM
Junior Member
 
Join Date: Aug 2008
Posts: 14
Default I got it

I knew i was missing something, i just figured it out.
I was trying to do the code without puting the control on the form.
I am not the brightest bulb. Hopefully you wont hear from me until i have a finished product. Again i really appreciate your guidance.
sue
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
b4ppc crash (table .SelectedCol .SelectCell) Romale Bug Reports 1 07-11-2008 02:19 PM
Table1.LoadCSV s_ostap Russian Forum 3 07-03-2008 08:30 AM
no event changingselected cell in a table? moharj Bug Reports 5 02-02-2008 05:41 PM
table1.filter dennishea Questions (Windows Mobile) 4 12-29-2007 02:18 PM
table2..3..4 (not table1) etc contains gray row with cursor ppcservice Bug Reports 1 07-31-2007 12:34 PM


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0