How can i do a nice formatted table for calculation like this one ?

Beginner

Well-known member
Joined
Mar 12, 2008
Messages
114
Programming Experience
Beginner
Im trying to design a table to put in values like this one:

2000857722718902793_rs.jpg


In my case i want to create a table similar to the one shown above.

So when a user hits the button "Common Features" i get some table similar to the one above with the following calculations :
((EXCEL))

2005449158622175021_rs.jpg


So how can i do something similar as in the firt image i posted when a user hits the common features button ?

79818793xr8.gif



I Uploaded my program[EXE File]. Please see the attached file.
 

Attachments

  • Spur Gear Calc.zip
    44.2 KB · Views: 12
You could try creating a datagrid, but not databound to anything, and recalculate when any of the values change?

Otherwise, I think the best way would be to build one yourself with labels and textboxes.

The latter usually looks better, also.
 
how would i approach the datagrid method ? May you provide me with the details ?

What about the latter ? How do i implement it ? Do the values change when i recalculate also ?
 
The datagrid method (IMO) will be messy to code.

You can create the layout with textboxes, and then on the TextChanged event of the relevant boxes, do your calculation for the other boxes.
 
Thanks for the heads up. What about the List view method ? is that going to be messy also ?
 
Ive used the table layout panel.

Why does the text allign feature doesnt take place. Is there a locked setting in the container that is preventing it from happening ? Or maybe thats not the button im looking for. I want to move the label to the center of the (cell,colum) ; (0,0)

2001798998538683309_rs.jpg



how can i take values from another form and pop them into (1,0) for example ? Will i need a text box(no input allowed) to show the result or a label ?
 
the dotted outline specifies the size of the label. you are attempting to set the alignment of the text within the label, not the label within the cell. Might I suggest you set autosize = false and dock = fill ?
 
When you mentioned the following:
Autosize= False
Dock = Fill

Those properties are common for both the label and the Table Layout Panel. So do i change them for both or just Table Layout Panel ?
 
Setting those options on the grid would be a bit like painting your whole house when you really only wanted to decorate the front room, no?

Well, you can either think about it some more, or you can just do it, observe the result and use your brain to work out what happened and why..

I'm here to help you with VB, not hold your hand and teach you the whole shooting match, including logic and common sense. Please, buy a book.
 
I think my post turned you on. Im sorry again man :) I figured it out.

I changed the labels dock = fill
and the text alignment to center.


Problem Solved. Thanks again :)
 
Back
Top