|
how would i cast the int[] or arraylist or anything to the ReadOnlyCollectionBase for just the properties grid..i still need to edit the values..i just cant let the user change them via the property grid.
|
|
|
|
|
n/m i have the desired result..i turned it into an ArrayList and used the ArrayList.ReadOnly() function to prevent changes..the only problem is that now it wants to use the collections editor instead of expanding the list like it does for arrays...if you have any ideas on how to force it to show as an array but stay read only it'd be great but if not i'll try to convince them to live with this.
Thanks for all your help
John.
|
|
|
|
|
Try sticking this on the top:
[EditorAttribute(typeof(System.ComponentModel.Design.ArrayEditor), typeof(System.Drawing.Design.UITypeEditor))]<br />
<br /> Using the EditorAttribute allows you to change the UITypeEditor being used in the properties window. When writing a control, this is how you would create your own custom editor for a particular property. From what I can see, there's a CollectionEditor and an ArrayEditor. Using an ArrayEditor may not work with an ArrayList, though. If I weren't lazy (or at work) I would actually create a project and try this out myself. Oh well, let me know if that works.
Logifusion[^]
|
|
|
|
|
no that didnt work with an ArrayList, tho it was a good idea...i didnt even see the ArrayEditor when i was lookin through there. I think i need to have my eyesight checked. i think they're ok with the collection editor now...but now instead of seeing the value the code needs, they want me to show the text of that node. Kind of like a SelectedText, SelectedValue deal...i was thinking of using another dimension on my array somehow. i'll try it out. btw this is really off topic but i'm taking my g/f to see a play tonite(one of her favorits) and i have a nice boquet of flowers to give her, what do you think give her the flowers at home infront of everyobdy, or take them to the restaurant to use as a centerpiece for the table, then take home from there?
thanks again.
|
|
|
|
|
Damn, oh well. You might want to try a type converter so that it shows the string representation as the text for the node.
I would say either way is going to get the same reaction, as long as she doesn't know it's coming. My gf always loves getting flowers. If you give it to her at home, she can put them in water and they'll last longer. And you won't have to carry them around everywhere. That's my vote anyways...
Logifusion[^]
|
|
|
|
|
I got it working, i created a class NavData which had a string and int arrays as the only members and for display i just return an arraylist created from the string array. works pretty good. Thanks for your help...she said she loved the flowers and thought it was a good idea to not carry them around all night. the only downfall was that they were fake flowers. i made some roses out of dollar bills and mixed em in with some very nice blue/purple and white silk flowers so that she wouldnt end up w/ a few dollar roses and nothing to do with em when the real flowers died.
Thanks for all your help.
John
|
|
|
|
|
I'm glad to hear that everything worked out for you.
Logifusion[^]
|
|
|
|
|
Hi,
I want to open program(like word) and display the appliction
in my form.
thank you for help.
and have a good day.
|
|
|
|
|
|
Hi,
i need some help on sending of MMSs. i am working on a windows application which offers users to send an image to their own mobile phones through MMS. i found out GSM modem may not be able to send out MMSs. i assume that a GPRS modem is required. however, other then the modem, i still need to get the API or SDK of MMS. Is there any ways or sources where i can get those APIs?
|
|
|
|
|
|
how about some freewares? cos i'm running on a low budget....
|
|
|
|
|
Hello all!
I am having problems on finding out, how to get acces to the certificatestore in PocketPC and WM5 devices.
I want to programmatically add and delete certificates from the personal store using c#.
Hopefully there is someone here that can help me get on my way.
Thanks in advance!
|
|
|
|
|
There must be someone out here that can help me .. ?
|
|
|
|
|
I did:
StreamReader sr = new StreamReader(path);
sr.ReadToEnd();
sr.Close();
StreamWriter sw = new StreamWriter(path);
I got error "The process cannot access the file because it is being used by another process"
Why this happen, I already closed the file
When in debug mode, it sometimes successfully openned the file, sometimes failed
|
|
|
|
|
Try opening the file as a filestream, and then passing the filestream handle to the streamreader and writer.
|
|
|
|
|
I changed it to
FileStream fs = new FileStream(path, FileMode.Open);
StreamReader sr = new StreamReader(fs);
sr.ReadToEnd();
sr.Close();
StreamWriter sw = new StreamWriter(fs);
and still doesn't work
I did wrong somewhere?
|
|
|
|
|
all I can think of is maybe making
sr = null;
after you close it. I can't check right now though so...
|
|
|
|
|
FileStream fs = new FileStream(path, FileMode.Open);<br />
StreamReader sr = new StreamReader(fs);<br />
StreamWriter sw = new StreamWriter(fs);<br />
<br />
sr.ReadToEnd();<br />
<br />
sr.Close();<br />
sw.Close();<br />
fs.Close();
Closing the streamreader before initializing the streamwriter causes a Stream was not writable. error.
Keep the reader and writer open until you close the file.
|
|
|
|
|
And where in the registry or wherever can you find out how much ram the computer has in total?
|
|
|
|
|
check this http://www.neowin.net/forum/lofiversion/index.php/t111332.html
code is given here.
Regards
Shajeel
|
|
|
|
|
|
Luk @ Process class members in msdn
|
|
|
|
|
Hi everyone.
I'm currently working with the framework 1.1
I'm wondering if i can automaticly set all the columns of a datagrid expanded to the size
then gets when i double clicked on to the separator column line.
Any help will be helpfull
Thanks!!.
NOthing by now;)
|
|
|
|
|
Any one can help me please.
I am setting the property of a control by another from at design time. But when i set it set it does not set.Any can tell me how i can set the property of control by another form at dsign time.
|
|
|
|