View previous topic :: View next topic |
Author |
Message |
Shailendra Baghel
Joined: 25 Nov 2005 Posts: 23
|
Posted: Mon Jul 02, 2007 12:52 pm Post subject: Progress Bar Embedded in a cell |
|
|
I have a form with Virtual Tree control in it.
I have to show Progress Bar in the cells of one column. Also i need to dynamically update the progess bar at run time.
The cell in which the progress bar has to be shown should not be editable.
Can i get any pointers on how to start with? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 03, 2007 1:47 am Post subject: |
|
|
Take a look at the Custom Type Editor sample project. It does exactly what you want. It defines a UITypeEditor class (StockLevelEditor) and associates this with the StockLevel property of the Part class using the Editor attribute.
Then in the Virtual Tree cell binding set the following properties:
DrawPreviewBorder = false
ShowPreview = true
ShowText = false
The sample project also allows editing (via a UniversalEditBox) - but if you don't want editing then you simply don't associate a CellEditor with the column/cell binding. _________________ Infralution Support |
|
Back to top |
|
|
Shailendra Baghel
Joined: 25 Nov 2005 Posts: 23
|
Posted: Tue Jul 03, 2007 7:23 am Post subject: |
|
|
But how to update the progress bar's value at run time?.
In the Custom Type Editor sample project, you are opening a dialog box on clicking the progress bar. In this you set a value and that is reflected in the progress bar.
My requirment is to update the progress bar at run time without a manual interaction. For example, I will have an event coming up in my applicaton which will indicate what the value of progress bar should be and that will have to be reflected at run time. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 03, 2007 8:23 am Post subject: |
|
|
Just change the value of the property that the ProgressBar is displaying (in the sample this is the StockLevel property) then call VirtualTree.UpdateRowData() _________________ Infralution Support |
|
Back to top |
|
|
|