|
dear friend
i have worked abit with datagrid but it has the limitation of all view will be of columes and rows but i am looking for some control/way in which i have to draw some table and decribling under all that table then again a table but all in one view i.e. atleats 10 tables and 1 paragraph of simple writting against after each table
|
|
|
|
|
Okay, so if I understand you right, you need a table of rows and columns with a block of text underneath the table? (Along the lines of this[^]?)
If so, then you can still use a DataGrid (or DataGridView if you prefer) and dock a Label or TextBox to the bottom of the parent control.
The DataGrid also has support for hierarchical tables (although AFAIK was removed in DataGridView) if that might better.
-- modified at 11:56 Tuesday 2nd May, 2006
|
|
|
|
|
Hello Graham
Special thanks for your help but i an unable to understand u fully, might be my lack of knowledge at gridview.
just for more clearification please have a look at the snap
http://www.geocities.com/junaid_qau/view.JPG[^]
http://www.geocities.com/junaid_qau/view.JPG
this is what i am trying to make and i need help in top right panal.
that panal will have data from the DB in different languages ( arabic, English, french etc ) as per user sellection .
so i was thinking to have some controll in which i can display that data in a user readable form.
it may be if possible to create well formated RTF/html in run time and so in rtf/HTML control etc. but that will effect the performance i think
anyhow any other ideas...
keep in mind i can use ONLY ONE panal in that GUI
thanks Regards
junaid
|
|
|
|
|
I have an Windows app that allows users to save "bookmarks", pages they have been, and then navigate back to them. That all works. In addition, we have restricted them to 15 bookmarks, and if they select a 16th, the first one in is popped out. I am attaching a Context Menu to a button on the toolbar.
Now they would like to be able to delete an individual bookmark. I have the code working to dynamically add the bookmarked pages, to a sub-menu item for deletes. I even have the code working to delete the item from that MeunItems collection. When I check the count of that collection, it is correct, and when I click my code to add another bookmark, the old ones appear, and the one I deleted is gone. HOWEVER, when I go through the delete code, and then click on the button, none of the entries appear. Here's the code:
Load the Menu Items, both in the Main menu and the Delete Bookmarks
private void button1_Click(object sender, System.EventArgs e)
{
for (int i = 0; i < 6; i++)
{
MenuItem myMenuItem = mainToolBar.Buttons[0].DropDownMenu.MenuItems.Add("Added Item " + i);
this.mainToolBar.Buttons[0].DropDownMenu.MenuItems[myMenuItem.Index].Click += new System.EventHandler(AnotherMenuTestMethod);
deleteBookmarkMenuItem.MenuItems.Add(myMenuItem.CloneMenu());
deleteBookmarkMenuItem.MenuItems[deleteBookmarkMenuItem.MenuItems.Count -1].Click -= new System.EventHandler(AnotherMenuTestMethod);
deleteBookmarkMenuItem.MenuItems[deleteBookmarkMenuItem.MenuItems.Count -1].Click += new System.EventHandler(DeleteMenuTestMethod);
}
}
Here I'm trying to delete a specific one (just to see how to do it)
public void DeleteMenuTestMethod(object sender, System.EventArgs e)
{
MenuItem myMenuItem = (MenuItem)sender;
deleteBookmarkMenuItem.MenuItems.RemoveAt(3);
MessageBox.Show(deleteBookmarkMenuItem.MenuItems.Count.ToString());
}
As I mentioned the count is right, but when I click on the button, NOTHING appears in the Delete Items.
<added>By the way the 'deleteBookMarkMenuItem' variable is a global one for the form.
I'm obviously missing something, anyone spot it?
THANKS!
WhiteWizard (aka Gandalf)
-- modified at 8:09 Tuesday 2nd May, 2006
|
|
|
|
|
As it turns out, it appears this is a "bug" in .NET 2003, and has been fixed
in 2005. I took the code as is into VS 2005 and it works fine. As we are
moving there in the next month or so, I guess I'll just wait to finish this
then.
WhiteWizard (aka Gandalf)
|
|
|
|
|
Hi,
I've got a generic class (Binary Tree)
public class ABB<T> : ICloneable where T : IComparable/*, ICloneable*/ {
.
.
.
}
I adapted it so items that are not ICloneable can be introduced into the tree, but if they are not ICloneable and they are not like (int, float...), because is another class that is not ICloneable, I'd like to print a:
#warning If the object is modified after introducing it into the tree, the object that the tree has saved will be changed too (if T is not a primitive type). If you wan't to solve this, make the class T implement ICloneable methods, and a copy of the original object will be saved into the tree, instead of copying its memory address (as is happening right now).
But this warning only MUST BE SHOWED if the class T that has been instantiated like:
ABB<ClassWhichIsNotICloneable> object = new ABB<ClassWhichIsNotICloneable>();
Well, it would be showed with old types too (int, float...) but there's no problem since it is a copy of the original type what is introduced onto the tree (as the warning says). As this:
ABB<int> object = new ABB<int>();
Well, int is not ICloneable, but there's no problem with it.
THANK YOU.
|
|
|
|
|
I don'think that the preprocessing facility in the C# IDE is flexible enough to satisfy your requirements. In the class's constructor you could test the runtime type of T, and if it falls into the category which requires a warning, use Debug.WriteLine to specify the warning. An advantage of this technique is that the developer's output window in VS won't be polluted with your warning message(s) on each build. I like a nice clean build - 0 errors, 0 warnings
Josh
|
|
|
|
|
Well, a clean output for clean designs. If your design (in this case, MY DESIGN) has troubles (if the class is not ICloneable), and the object that you think that is for sure can be modified by side-effects (if I wasn't able to call Clone(), then I copied the memory address), there must be a WARNING to let the programmer know that he has to be *VERY CAREFUL* with the original object, or make that class ICloneable, so warning message *WILL DISSAPEAR*.
Well, if he does well, there will be 0 errors, 0 warnings.
Cheers !!
|
|
|
|
|
What does this have to do with your original question?
Keep in mind that implementing ICloneable is not always an option. If your type contains a reference to another type which is not cloneable, then your type cannot provide true deep copy semantics. In that case, your annoying warning message will not disappear.
Josh
|
|
|
|
|
You're just right. In that case the #warning message wouldn't be showed, and my class would't be able to provide a true deep copy, but in that case, and only in that case, the problem (the main trouble) would be that the developer that wrote it was wrong, because didn't think about implementing Clone() method to provide a deep copy.
We sometimes just have to trust in developers that are gonna use our classes, so we cannot do more than we are doing right now.
Far away, you're right, my warning would not appear when compiling.
Thank you for your comments Josh.
|
|
|
|
|
hi to all,
i would like to have a form with an button that can show hide the form border like msn messenger does. also hides menu strip.
this is the code i have but i get terrible flicker when the controls are set visible, msn is really smooth, how can i acheive this please?
i have 7 picture boxes that contain the bg pictures and a toolstrip in the middle of the form, are the mutiple picture boxes the problem or is there a better way
if (e.Button == MouseButtons.Left)
{
if (this.FormBorderStyle == FormBorderStyle.None)
{
this.FormBorderStyle = FormBorderStyle.Fixed3D;
this.menuStrip.Visible = true;
this.Location = new Point(this.Location.X, (this.Location.Y - SystemInformation.CaptionHeight));
this.TransparencyKey = Color.Empty;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
this.menuStrip.Visible = false;
this.Location = new Point(this.Location.X, (this.Location.Y + SystemInformation.CaptionHeight));
this.TransparencyKey = SystemColors.Control;
}
}
kind regards,
g00fy
|
|
|
|
|
Try to use doublebuffer.
SetStyle(ControlStyles.DoubleBuffer, true);
|
|
|
|
|
yeah thanks for the reply, but i am doing that.
i moved the transparencykey line when settings visible true to the first line and it improved but its still very ordinary.
thanks
g00fy
|
|
|
|
|
hi
i want bind 2 exe files in one file .. how to do that ?
and how to extract those exe files again ?
|
|
|
|
|
In what way? Do you mean the 2 exes should be embedded inside a resource? Or that 2 exes should work together (using remoting)? Or that they share common code in form of a dll?
|
|
|
|
|
I am doing a report programmatically(with COM) using Word 2003. First I build the report and print it. Then the idea is to remove all headers and footers(with logos etc) and print it again with only Page {PAGE} of {NUMPAGES} in the header. I can remove the headers and footers but can't add the pagenumbering . There probably is som escape code I should use or then it is just impossible. Any ideas?
Of course I could use two different .dot files but is too slow for me.
jhaga
It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business.
Henry David Thoreau
-- modified at 6:50 Tuesday 2nd May, 2006
|
|
|
|
|
Try to start record a macro, and do manually what you want.
After that copy and modify macro code to your language.
This helps me, when I was making export to Excel.
Best regards, Alexey.
|
|
|
|
|
Thanks,
it is in VB:
NormalTemplate.AutoTextEntries("Page X of Y").Insert Where:=Selection. _
Range, RICHTEXT:=True
had missed that it is richtext
jhaga
It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business.
Henry David Thoreau
|
|
|
|
|
Hi All
I want to create a DTS that will read a .txt file (comma separated) and insert record in database. I want to pass .txt file name on run type. Please help me to sort out this problem.
It’s urgent.
Thanks in advance.
Amit
|
|
|
|
|
You can add a reference to the COM object called "Microsoft DTS Package Object Library", then you want to start with DTS.Package2Class . The process from there onward is far too vast to explain in a single forum post - so give it a try and post specific questions when and if you get stuck.
I havepersonally used this COM object from old VB6, and from C# so I am sure I will be able to help you with specific questions - ill keep an eye out on this C# forum in case you get stuck.
Lastly, please leave out the "urgent" - it will not get you an answer any quicker!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Ok fine I will try and thanks for your help!
Amit
|
|
|
|
|
Hi, I am trying to learn a bit of C#, so I'm trying to make a console program (a Hellow World).
I have the following code:
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
<br />
namespace ConsoleApplication1<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
Console.WriteLine("Hello World");<br />
}<br />
}<br />
}<br />
When I run it, I get a console window that displays that, but closes immediately. How can I prevent the console window from closing?
Thanks
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadLine();
}
}
}
|
|
|
|
|
|
open the command prompt and run the app from there ...
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|