|
I have m working on winform application.
In one panel i have 2 datagridview( which are created dynamicaly and can move) i have done this part.
In DataGridView i m showing table column name.
Now when user do drag drop operation i.e drag ny row of first datagridview to second, a line should come between them ( to show link between them).
How to create a line in c# and when user move datagridview by mouse, this line should move.
I didn't find out any line control in visual studio 2005.
Hope you understand what i m asking for.
Thanks lot.
|
|
|
|
|
you should use graphic class.
some code like this:
Graphic gd=this.createGraphice();
gd.drawline(Pens.black,new Point(10,10),new Point(100,100));
so,gd class draw line from 10,10 to 100,100 on the form.if u like to draw it on Panel u should create your Graphic class instance from Panel.
it means u should write:
Graphic gd=panel.createGraphic();
|
|
|
|
|
NEVER call CreateGraphics. Unless you want a temporary line that will disappear when the form is invalidated.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
NEVER call CreateGraphics
what should i do if i want to draw something on a control?!
|
|
|
|
|
Handle it's paint event. If you must call CreateGraphics, you need to do it inside a paint event, otherwise, your painting is going to disappear the moment your control is obscured.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks Christian Graus and all.
I m able to draw line but now i to increase or decrease the length of line by mouse.
I don't have any reference to that line.
How to do this.
Hope you understand what i mean.
Thanks lot.
|
|
|
|
|
The graphics class has a DrawLine method. If you handle the paint event of the control you want to draw on, you'll be responsible for drawing all of it, but you will be passed a graphics object to use. Calling CreateGraphics creates a temporary object, if your window is hidden and shown again, what you drew will be lost.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I want to ask one more thing that i am using this code ... where height is the Font height and startPoint_x and startPoint_y is the point where text is to be display
CsGL.OpenGL.GDITextureFont myGDITextureFont;
Font newFont;
newFont = new System.Drawing.Font("Microsoft Sans Serif", (float)height);
myGDITextureFont = new GDITextureFont(newFont, 'a', 'z');
GL.glTranslatef((float)startPoint_x, (float)startPoint_y, 0);
myGDITextureFont.DrawString(text);
and in this way text displayed but when i click on it it turns into solid bar .... What is the problem with this code ....
|
|
|
|
|
Where are you getting the height from? I don't see it being initialized anywheres.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Actually i am importing and exporting *.DXF files in my application. So, i took the height from that dxf file that is being imported.
Problem with this code is that it can draw text but when you click on it it will turn into solid Bars and nothing text can be visible after clicking .....
|
|
|
|
|
Hello,
Any help would be great! I have tryed the (datagrid.columns[1]. visable = false) the issue is that, using this method shrinks all the rows of data in the data grid view. Even if i set the row height, it seems to make no difference. I need to set which columns are shown in code, and I change the data source for the data grid view as needed. any help would be great.
thanks, J
|
|
|
|
|
try this
DGV.Columns[1].Width = 0;
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thank you for the help, but that does not work. You can see all the columns with a width of 0, they appear as just lines... you can still expand the columns with a width of 0, to see the data. but thanks.
|
|
|
|
|
set "AllowUserToResizeColumns" property to false
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi
very easy
set colum width is zero.
thanks
|
|
|
|
|
Thank you for the help, but that does not work. You can see all the columns with a width of 0, they appear as just lines... but thanks.
|
|
|
|
|
Hi
Is it in web or windows applciations?
thanks
|
|
|
|
|
|
Hello,
I´m writing a program that runs some gwak scripts.
The problem is that before this process ends, the aplication continues to execute others C# instructions, and obviously it blows the all thing.
My question is how can i delay the execution of the instructions until the process of runing the scripts ends?
|
|
|
|
|
If you're running a script with Process.Start, you can get back the process that was started, and wait for it to end.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I´m working with a process, but the set of instructions i need to delay are not part of the process, so i tinck that i can do it with a thread.
Tanck you for your help the link was very helpfull.
|
|
|
|
|
I'm trying to render a webpage that I previous navigated to it with an axWebBrowser control, the webpage has some adobe flash animations, that of course delay to load in.
when I render the page and saved as a .png file, there exists white rectangles where the animations are.
How can I solve this issue?
Thanks.
P.S. Excuse some or many writing errors.
|
|
|
|
|
Hi All,
stupid question alert!
I've not used generics much yet and I'm just poking around the net looking at various implementations of Generics and I have a question. Can a generic list hold multiple fields? Somethihing akin to a datatable like, a few strings, an int a couple of bools ... ??
I've not come across any demo's of anything like this. If you need to do this would you create a generic list from a class?
Thanks,
James.
|
|
|
|