|
I even thought it might have something to do with the orientation of the header text, so I made them all Left, but that didn't have any effect either..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I created a new project with an unmolested listview control, dropped the code into it, and it still does it. Could it be a Windows 7 thing?.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Possibly. I'll try it out later on."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
It's a Windows 7 thing. The icon in Windows 7 appears centred above the text."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi!
The extention method works pretty good. (I'm on XP and it's on the right of the text)
Does anyone know, if there's any chance to set the flag
lvcolumn.fmt |= HDF_BITMAP|HDF_BITMAP_ON_RIGHT;
instead of
lvColumn.fmt &= ~HDF_SORTDOWN;
lvColumn.fmt |= HDF_SORTUP;
and then load a picture (from the C# .resx file for instance) ??
I would like to use the same exact extention, but drawing a custom arrow of my own instead of the system's arrow
... any help appreciated 
|
|
|
|
|
Edit: It works well with _IMAGE instead of _SORTDOWN or _SORTUP
Only problem is that it will remove the other image on the column header
(if you dont have any image in your column header, then it's all fine, but if you do, like in my project, well it will be either on the left, or on the right as a sort indicator, but not both.
My plan was to leave a column header image on the left, and a small arrow on the right......)
Will need to owner draw the full header :/
That's bad because column header's mouse over event are pretty hard to catch.. dont even know how to do so far......
Anyway, if someone has a clue.. 
|
|
|
|
|
Ok in java it looks like this:
private static int maxState = 10;
private int [][] avtomat = new int[maxState][256];
Now i would like to declare same array in c#. When i tryed private int [][] avtomat = new int[maxState][]; and fill array with values like this avtomat[0][0]=-1 I get error "An unhandled exception of type 'System.NullReferenceException' occurred in.. Additional information: Object reference not set to an instance of an object."
What am i doing wrong?
Thx
|
|
|
|
|
private int [][] avtomat = new int[maxState][]; It's a null parameter."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
But if i add value to second []..i get this error CS0178: Invalid rank specifier: expected ',' or ']'.
|
|
|
|
|
use something like
int blah[,] = new int[80,20]
[Edit]
C# has two kind of multidimensional array: jagged and rectangular
int[,] numbers = new int[,] { {1, 2}, {3, 4}, {5, 6} };
int[][] numbers = new int[2][] { new int[] {2,3,4}, new int[] {5,6,7,8,9} };
[/Edit]modified on Friday, February 26, 2010 10:18 AM
|
|
|
|
|
|
Now when i did like this int[,] array=new int[10,256] it gives me error CS0022: Wrong number of indices inside []; expected '2' when i am adding values->array[10][2]=-1 for ex. I tryed few examples from msdn still can't get it to work!!
|
|
|
|
|
|
yeah this works..thanks a lot;D I need something else please.. how to write this from java in c#?
try {
datoteka.mark(1); ?
int tmp = datoteka.read();
datoteka.reset(); ?
return tmp;
|
|
|
|
|
Maybe this?
try
{
datoteka.mark(1);
int tmp = datoteka.read();
datoteka.reset();
return tmp;
}
catch { return -1; }
|
|
|
|
|
Thanks for 1 voting me for giving you the answer. I really appreciate it. "WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey Pete, I hope you don't mean
private int [][] avtomat = new int[maxState][30];
Because that is not C#!
Actually it's unclear what you really mean here, but if you interpret it as above you get the compiler error the OP quoted
|
|
|
|
|
Totally OffTopic but what does OP stands for?
I mean I know it has something to do with the person that posted the question/message
but what's OP from?
Object => hope and know not 
|
|
|
|
|
|
|
That's not what I meant. I was pointing out where the null reference was occuring. If you tried the example you quote here, you get an InvalidFieldSpecifier problem, not a null reference exception."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: That's not what I meant. I was pointing out where the null reference was occuring.
Ok, then IMO it's an odd way of pointing that out..
Pete O'Hanlon wrote: If you tried the example you quote here, you get an InvalidFieldSpecifier problem, not a null reference exception.
You'd get Invalid rank specifier: expected ',' or ']' as the OP also posted, which is exactly my point, if that had been what you meant, you would have given him invalid code. And from the OP's reaction, that is how what he understood your post to mean..
|
|
|
|
|
I didn't give him code - that was the whole point. He asked why he was getting a null reference exception; I told him. What he did next was up to him - without knowing what he was trying to achieve with it, I did not feel it was my place to suggest what he should do to resolve this and nowhere in my original answer did I suggest that he try to put a parameter to put into there. I will not be held responsible for somebody reading more into an answer than was there."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I don't think I agree Pete, your post looked a lot like "code with something you have to fill in" - it still looks that way to me, and going by his reaction it also looked that way to the OP.
But of course I'm not holding you responsible in any way (this is teh interwebs), I just tried (and failed, clearly) to point out how it would be confusing - you really don't need to get all defensive over it
So, my apologies.
|
|
|
|
|
I can see your point about why it looked that way, but it was never my intention to make it a "fill this bit in and it magically works". This is what I get when answering a post when juggling an installation onto 360 machines at the same time.
Perhaps I could have been clearer, but I'm not getting defensive on this - I was just trying to clarify that I knew this wasn't valid C#, and my answer wasn't intended to suggest it was. Next time I'll try not to be as "clever" with where I put the pointer to the problem."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|