|
Christian Graus wrote:
I've had it time out at about 180 MB 7 or 8 times.
You mean you dont use a download manager? Yes, the link I posted came straight from my download log! Maybe they shifted location....
top secret xacc-ide 0.0.1
|
|
|
|
|
leppie wrote:
You mean you dont use a download manager?
Good point - downloading one now
leppie wrote:
Maybe they shifted location....
No, it's there, it just keeps dropping out. I have enough disc space, and then some, the problem is that the net connection in our new office is flaky.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
|
I have an program with a listview, which is in report mode. I have several columns, and one of them shows a file path, so I want it to be right aligned, so I always see the end. I've set this property both in the code that sets up the columns, and later, but it makes NO difference. My columns are always left aligned. Does anyone have an example of doing this (presumably trivial) task ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
If the column that you want right aligned is the first column in the listview, it will be left-aligned. There is no way around this. Make the file path column the second column and set that to right aligned and it will all be okay.
|
|
|
|
|
I have a dataset that contains multiple columns of text that needs to be displayed in a control on a Windows form - much like a spreadsheet. The rows need to be selectable so I can retrieve data later on in the application (by being able to retrieve an index or column ID). I'd like the entire row to be selectable rather than just a specific column. I have looked at using a datagrid, but that seems to be overkill. I also looked at some multi-column listbox controls on Code Project but they go much farther than I need my control. Perhaps there is another control or custom control I should use?
|
|
|
|
|
Peter8675309 wrote:
Perhaps there is another control or custom control I should use?
The DataGrid and other controls are overkill? You could always write your own, defining only what you need. I would assume any other control out there is probably going to also be too much for your needs as they typically try to supply what the DataGrid doesn't out of the box.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Nick;
Turns out the datagrid WILL work fine. not sure what I was thinking (maybe I wasn't). The only thing I have to do now is programatically set the column widths for the data.
Thanks for the quick reply.
|
|
|
|
|
Hey everyone, just wondering what your thoughts are on Get & Set! I've got a class in which I have two public variables. The class itself changes their values, and any calling class can also change the values.
Is it "bad form" to just leave these variables public? Or should I turn these into class properties by doing:
private int _myvar;
public int myvar
{
get
{
return _myvar;
}
set
{
_myvar = value;
}
}
The class is so specialized that I don't need to do any checking during a "set" when I call the class methods. My instinct says that I'd get a microsecond or two of a performance boost by just leaving myvar as public, and eliminating the private/get/set/propery code. But I'm curious as if to this is bad form.
I could see if I had to prevent a "set" operation, or perform a check on the value first- but I don't have to do either of these.
Thanks!
-Thomas
|
|
|
|
|
The main argument against public fields is one of compatibility. If you change the public field to a public property, then that is a breaking change.
So, probably not a big deal for monolithic single EXE apps, but for class libraries it is a no-no.
In C#, I usually just put the whole property on a single line -- that way it does not clutter up the code so much.
There is one (experimental) .NET language takes care of this more elegantly, called Boo. It uses attributes to let you mark a private field as having a getter and/or setter, which is then auto-generated at compile time (by the Boo compiler).
my blog
|
|
|
|
|
Virtually all the .NET framework uses get/set properties, even for lightweight structs (Point, Size, Rectangle, for example).
The only times the framework exposes fields are static readonly fields; aside from that the standard seems to be to expose fields as properties.
Judah Himango
|
|
|
|
|
Steven & Judah, thanks! I guess I'll change those fields into properties- I hate "breaking style". The class is sealed- it's basically for some help during a system data migration- but as trivial as it is, I don't want any poor coding habits popping up!
-Thomas
|
|
|
|
|
Steven Campbell wrote:
There is one (experimental) .NET language takes care of this more elegantly, called Boo. It uses attributes to let you mark a private field as having a getter and/or setter, which is then auto-generated at compile time (by the Boo compiler).
C++/CLI has something similar, called trivial properties. Basically, you say:
property int Something
and compiler creates a private variable and a property for you.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Which in turn generate the appropriate get_x and set_x method calls.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I want to be able to change the error icon shown in the datagrid cells on a per cell basis when i use the SetColumnError method.
For example, my application has errors and warnings. Errors prevent a user from saving any changes and warnings are only a visual indicator that the user needs to read.
I want to display the normal red error icon for errors, but want to display a different icon (a yellow error icon) on a warning.
How can I change this icon?
|
|
|
|
|
Hi.
I want to be able to configure and monitor what a service is doing on the fly, by means of a gui. I want the service to run as a normal service, but to allow an optional user interface.
Like the sygate firewall, for example.
How can I do this? should I use two different .exe? add a form into the service that is called when a user logs in?
Thanks
|
|
|
|
|
Services should not contain GUI components. You should write a separate application for configuring the service, this application may have to communicate directly with your service or may just alter some centrally accessible configuration options somewhere (like a datbase or file).
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Help! I've created several custom controls, but I notice that when I layout several on a screen and hit F5 to enter the debugger, sometimes the last control created will leap up to 0,0 on the design grid. Actually, the application that is being debugged shows everything fine, but on the IDE's design screen the control has lost all its properties and been jerked up to the top left corner. It kind of looks like the control was deleted and put back at 0,0 without my intervention.
I don't know how to debug this since it seems to happen behind-the-scene and doesn't hit any breakpoints in my app. It's all fine until I exit the debugger and run again, but if I watch the IDE I see the control jump immediately when I hit F5. If anyone has seen anything like this please give me some insight into what I'm looking for and how to track it down.
After it does it once, I can move the control back and it's repeatable, but if I add/delete controls from the screen it stops repeating.
thanks!
Deanna
|
|
|
|
|
Hi,
I ve got a string containing ", and i have to replace it by \" before to send it as argument of an external program. So i use successfully the method replace:
request.Replace("\"", "\\\"");
But when i try to do the opposite with the reply, it doesn't work at all!!
reply.Replace("\\\"", "\""); // this don't do anything
If sombody has got an idea....
thks
SkN 0o.
|
|
|
|
|
I tried this
string request = "\"Hello\" World";
Console.WriteLine(request);
request = request.Replace("\"", "\\\"");
Console.WriteLine(request);
string reply = "\\\"Hello World\\\"";
reply = reply.Replace("\\\"", "\"");
Console.WriteLine(reply);
And it worked fine. Of course, I hardcoded the strings. Are you sure the reply is coming back in the expected format?
Michael
CP Blog [^]
|
|
|
|
|
I'm sorry this question is so vague, but I'm not sure where to begin. I'm attempting to create a TrackBar from scratch. I'd like to implement rounded corners in both the borders of the TrackBar and the sliding user component of the control. Can anyone suggest where I can being researching how to create the rounded corners of the back ground ? I've started with a Panel control and created a rounded-corner rectangle bitmap as the Panel's background image. I think I'd have to use GDI to locate corners and set the color to Transparent or somthign like that, but again....I'm not sure. Any hints or idea on where I can start looking for the solution to my problem ?
|
|
|
|
|
|
OK, Great advice leppie, I've created the shape I need, but I'm having trouble figureing out how to "capture" the exterior region of the control shape (i.e. outside my rounded rectangle)
I want to set the color of these four regions (each corner) to Color.Transparent, but I don't know how to identify these regions...any ideas ?
|
|
|
|
|
I think I figured it out.
|
|
|
|
|
I have a control which inherits from textbox and when i set the
PropertyGrid.SelectedObject to my control the property grid shows all the public properties which are inherited, how can i hide these properties ?
like hiding all the behavior attributes.
(without overriding all of them and setting [Browsable(false)] to each one)
|
|
|
|