|
Thats probably because the length og the characters of the gont you are using isn't always the same. Either use a gont where all characters have a fixed length (like Courier New) or make the following changes:
x = x + linklabel.Width;
x = x + label.Width;
As you have set AutoSize to true this will ensure that the next label is set right next to the previous one. It still might be that there is some space in between but definitely no overlapping.
|
|
|
|
|
Great! But the text is displayed from bottom-right back up to top-left. How do I change this display order?
printscreen12345
|
|
|
|
|
I shortly tested the code and it seems to be in the order I would have suspected. How are you getting the values into the text DataTable? Are you sure its in the correct order in there? If you have a DataGrid where this table is bound to and the grid is somehow sorted or columns are rearranged via column styles this might lead to what you are seeing because the DataTable won't be reordered the way the grid is.
So please describe a bit of the surroundings. Maybe then I can help you.
|
|
|
|
|
I guess I have not made it clear enough. When all label text are displayed, they are in correct order. But the last label (which is from the last row of the datatable) is displayed first in the bottom-right corner instead of the first label being displayed first at the top-left corner. Why does this happen?
I tried using flowlayoutpanel but I'm not quite sure how to use this.
|
|
|
|
|
Hmm... I don't know. My small test data displayed fine. You could try debugging through each label creation to verifiy that they are created in the correct order...
|
|
|
|
|
If you are using .NET Framework 2.0, take a look at the FlowLayoutPanel, which dynamically lays out its contents horizontally or vertically. This could spare you the whole calculation part.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
I want to receive message of yahoo messenger by a C# program that I wrote but I don't know. Cam you help me? I sent message to chat window of yahoo messenger by APIs.
This is image for my request:
http://dangkimienphi.googlepages.com/sendmessageeng
Phong
|
|
|
|
|
Hi all.
I'm looking for someway that I can set a registration code or license key.
Something in the concept of the app generating a code on their side, they call and give it to us and then we use that code to generate another code on our side. Then they must enter that code provided from us.
Somehow that code must be stored and every time the app is started it must check if the code is still within the valid period.
Any ideas?
Thanx
He who laughs last is a bit on the slow side
|
|
|
|
|
i'm using datagrid called (ctgrid) right to left not provided in it ... how can i add this properity to this control ..in Vc++ i solv this problem by using api function called getwindowlong and setwindow long but in c# i don't know how can i use api's so if any one can help me i will be glad ..thanks alot..
aloka basha
|
|
|
|
|
alokabasha wrote: but in c# i don't know how can i use api's
Research PInvoke. Maybe this[^] will help
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
thank u very much for ur help i found there many things can help me .. i will try to use it.. Do u know datagrid control simply can be used as (Right to left) thaANK u again
|
|
|
|
|
I have a TreeView control inside a TabControl. Im adding my items from a collection.
foreach (LogicStatementLine line in ift.Triggers)<br />
{<br />
newNode = new TreeNode(ift.GetObjectName(line), 10, 10);<br />
node.Nodes.Add(newNode);<br />
newNode.Tag = line;<br />
}
I have set the ShowNodeTooltips to false on the TreeView control. Yet Im still getting them when the text extends beyond the viewable area. Is there anyway to turn them off completely?
|
|
|
|
|
i have this problem (Thread is running or terminated; it cannot restart.)
and i search for solution but what i was read about that {thread which has died cannot be resuscitated}, so how can i make the aborted thread start again ?
|
|
|
|
|
|
You cannot restart a thread which has completed (normally or abnormally). You have to either create a new thread or use a thread pool.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
thanks..
i just make new thread within my loop
|
|
|
|
|
How can i simulate Mouse Events so that any control who wired on to event and has an event handler will be called without clicking the mouse physically.
Another Simulation, simulating MouseMove on the screen to an object and clicking it.
|
|
|
|
|
u can try
MouseEventArgs E=new MouseEventArgs(MouseButtons.Left,1,3,3,3);
form1_MouseDown(this,E);
this will call forms mouse down event with out acctually clicking mouse.
rahul
|
|
|
|
|
Is there a way to query AD for the computer name the user is logged onto based on their user name?
I work at a Help Desk and we're constantly asking for their computer name so we can remote in with some 3rd party software. It seems there should be a way to query AD based on their user name and get the name of the machine they're currently logged onto.
I'm looking to make a simple console app, similar to "net user jdoe1 /do" or something along those lines. Any ideas?
|
|
|
|
|
Might be more of a framework question.
It is a design-time question.
So I am interfacing with an object (to be written by someone else), which executes requests asynchornously on a worker thread. I am interested in an failures that may occur in the execution of my request. How can he propogate exceptions to my original thread of execution?
Thanks
NIK
|
|
|
|
|
Put all the worker code in a wrapper method that looks something like:
try
{
DoProcessing();
}
catch(Exception e)
{
//Invoke some method/event on the original thread here
}
catch
{
//Invoke some method/event here as well; even though C# doesn't allow it, there can be exceptions that don't have objects
}
|
|
|
|
|
|
If the worker thread is a threadpool thread created using BeginInvoke, then the CLR catches and rethrows the exception when you call EndInvoke (usually called in the callback).
Hope this helps.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I would think the CLR would have to or thread pooling wouldn't be a viable feature.
Still though, I don't control the creation of the thread that would be firing the exception. I think I'll have to settle for an manual notification (event perhaps), which won't be the same as an actual exception, but I can always throw one as a result of the notification.
Thanks to all for the responses.
NIK
|
|
|
|
|
I did a search with what's in the subject line and got no results. How can I transfer data from one form to another? There is an example in the VS Help section that instructs you to create a class to hold the data. Is there an easier and faster way?
Thanx
Jude
|
|
|
|