Vertical Scroll bars and displaying data - vb.net

Im trying to control either two richtextbox's or two listboxs scrollbars with 1 vscrollbar. I want to display some data in a table like format, with 1 list separated from the other for asthetic purposes and would like the information to stay together line by line.
Does anybody know how to achieve this or perhaps a better way of doing this?

Related

How to add button for each row in table?

Labview,
i would like to add button for each row in table and this button depends on number of rows of data in the table,Button will add programatically in each row.
Reference Image: Cross button
When do you say "Table", Are you referring to "Multi-Column ListBox" or "Table Control" or Individual 1D arrays that are arranged like a Table? There are many ways you can do this!
An array of Clusters as Dave_St suggested.
Using a Table control & Boolean Array.
Using a Table control & Array of Picture Ring.
Using individual 1D Arrays Arranged like a Table.
I'd recommend the first method. Since it makes data handling pretty easy!
But If you're going to go with any other method! You can make your boolean array background as white/transparent and place on top of a Table Column!
Example:
In the above image, I used a Table Control and an array of Picture ring. But you need to synchronize both your array's scrolling positions! Only then the user shall be able to see the correct status for the row.
It seems like you're trying to imitate a webpage form! If you want to dynamically add controls/indicators to your VI check out VI Scripting! But I'm not sure whether VI Scripting will satisfy your requirement.
There are a couple of other ways to get this behavior. However, the array of clusters is probably the easiest. Two other ways to do it are:
Use the glyph (symbol) functionality of a table or multicolumn listbox
Create a data grid or use the DataGrid QControl.
P.S. You currently cannot programmatically add controls/indicators during run time. So VI Scripting won't help you there.

bind Data table to chart in vb

I have a project that im working on at the moment in VB.
Basically I have a Data Table in VB it populates with 4 columns and a variable number of rows, the column names are as follows;
Gear, RPM, Speed, CO2
The data table appears in datagridview correctly but that's as far as I have gotten :/
What I am trying to do is to make a line chart called mainGraph to draw a graph based on these results, I'm getting stuck when trying to populate the chart.
ANY thoughts would be really appreciated.
I am guessing you are using the ms chart controls and not some 3rd party like Telerik.
This should be usefull http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
Also, there is source code found at http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418
in short this is a way to get things displayed
mainGraph.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Line
mainGraph.Series(0).Points.DataBind(yourDataTable.DefaultView, "Speed", yourDataTable.DefaultView, "Gear")
These commands should make a line graph with Speed on your x axis, and Gear on your Y. Assigned to "Series(0)"
To add more columns, you need to add more "Series"
mainGraph.Series.Add("RPM")
Do some thinking about how you want this data displayed.
how would you like to set this graph up?
I'm assuming you would want a line graph?
What is going to be the X axis? Is there a missing column that needs to be "time" in the data table?
do you want them all on one graph/chart area?
If you would like more charts, then you need to add chart areas. A series can be assigned to a chart area.
Hopefully this helps.

How to make two text fields in one container like this?

How to make two text fields like middle screen in this picture:
Of course in this sample it list, with Labels, but I want make simulate control with TextFields. How I can make this?
it's a tableview with the style is group, and have a hardview in table, one section with three cells

Grid expand on data Clicked

I have a Grid with say 10 rows and 5 columns. suppose the first column is "Name"
So the data would be some thing like
Name
abc
xyz
pqr
Now My query is, I want to Expand the Row on "abc" click, i.e. on "Name" columns data click.
And wanted to show the data of the other columns from the same row.
I have attached the image , Hope this will clear my requirement.
In the image it is shown that, the RowExpander, we can make the row expandable. I wan the same functionality but not on click the Plus image, but on the name of the first column. i.e. from the above image when user clicks on "3m Co" from the company column. the Row should get expanded. i.e. what currently displayed in the image.
My advice is to stick with the rowexpander plugin - it's UI is much more user friendly than what you want to do.
The other way is to use rowbody and add custom functionality to collapse the rowbody with an itemclick listener - yeah good luck with that :)

access: displaying data on a report

i have a report that is attached to a query
i want to display the contents of a query. there are three columns. i made a list box but it looks weird:
alt text http://img130.imageshack.us/img130/2245/52036335.png
i dont want the scroll bars, i just need the three fields from a query to be displayed regularly just as they would be in a spread sheet or grid
In your report's Detail section, create a text box (not a list box) for each of those 3 fields in your query.
It might be easier to get oriented by creating an autoform based on the query.