|
The question is not so clear dilip... Your requirement is merely explained.....
I am just trying to understand it clearly....
1.you have a form say Dilip_Form
2.You have a panel in the Form.
3.You have a custom control which is added and instantiated during the run time.
4.The custom control have two buttons.
5.Either of the button can be used to perform the accept function by selecting a choice in the dropdown combo.
What you need now ???
|
|
|
|
|
Actually,in the custom control i dont have the property Accept button.
My requirement is to dynamically make the button as accept button.
|
|
|
|
|
Hi,
The help info for the Form.AcceptButton property says
This property allows you to designate a default action to occur when the user presses the ENTER key in your application. The button assigned to this property must be an IButtonControl that is on the current form or located within a container on the current form.
I haven't tried this but it suggests that you can set the AcceptButton property of the outer form to one of the buttons in your control.
e.g. this.ParentForm.AcceptButton = this.btn1;
Alan.
|
|
|
|
|
|
im doing loading some images i what to check where loading item is exists in the list or not i tri this but cannot
any idea...??? other ther i can ready item.text....
when i load same image this condition is working and brake it but i want to check all the items in the list befor load image...
if i put path != item.text its not check all items in list...
if found fist item and path != its althe way load.its not check all items and load....
how can i do that.....
foreach (string path in dlg.FileNames)
{
foreach (ListViewItem item in listView1.Items)
{
if (path == (item.Text))
{
break;
}
}
FileInfo fileInfo = new FileInfo(path);
listView1.Items.Add(path);
imageList.Images.Add(Bitmap.FromFile(path));
}
A S E L A
|
|
|
|
|
|
But How to check specific file ...i mean selected file whether exisits in the list or not....
A S E L A
|
|
|
|
|
File.Exists("readtheonlinehelp.txt")
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
You could have found this information by searching MSDN[^]
|
|
|
|
|
If you read the documentation then there is nothing you will need to ask here regarding this task. Everything is fairly basic and .Net provides direct properties and methods for these tasks.
Check out File and ListView class in object browser. Read about all the properties and methods.
|
|
|
|
|
Cool - you win today's 'biggest moron' award. Not an easy feat....
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you're wanting to check for the file that triggered your method use;
public void Example(object sender, FileSystemEventArgs e)
if File.Exists(e.Name)
{
}
The FileSystemEventArgs e is allowing you to reference to the file that's triggered by your method. A good example is if your using FileWatcher or something similar.
|
|
|
|
|
Goobashi wrote: If you're wanting to check for the file that triggered your method use
I guess Christian doesn't want to do this because he already knows how to. Perhaps you might want to reply to the OP instead.
"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
|
|
|
|
|
Pete O'Hanlon wrote: I guess Christian doesn't want to do this because he already knows how to.
Actually he knows much much more things than that.
|
|
|
|
|
i tried
listview1.Items.Find(path, fales)
but how can i put this if else and get bool return value???
if(listview1.Items.Find(path, fales)) is not wokring...!!!
A S E L A
|
|
|
|
|
Christian...
this is only for you...
i don't care about your stupid words bcz i got lots of works to do?
but remeber this,
Once you born to this world you didn't know any thing but when you grow up you learn many thing from social.It could be many ways...you may know more & more things compairing to others now,you may cleaver than other.But once you get to know much more things related to one thing, don't think that you are the man... don't think you know every thing in this world...Every body are not cleaver in every thing... we all learning things day by day...once you learn its easy to use....but the difficult thing is learning a new thing...i guess thats same for every body...
A S E L A
|
|
|
|
|
i am a msc student.As part of my course completion ,i selected a project
topic "FTP client" is it enough for 6 months?Could you please explain
about its modules?
|
|
|
|
|
What bloody uni are you guys at - this must be the 3rd or 4th time this has been asked in the last couple of weeks.
Do you not have a tutor/teacher/professor to explain the modules, what are we mind readers!
Do some work you pillock, research, you know where you try and find answers for yourself. The things that make you an outstanding student instead of a statistic.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How about google or msdn ?
|
|
|
|
|
At least it wasn't in text speak so he's not a total loss.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am sick of reading posts title "doubt" asking if a topic is enough for a 6 month project. All we have to base a guess on is the stupid subject title and a semi-literate question, and going on that it will probably never get completed.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
No. I've implemented an FTP client in about three days. That's the back-end and the GUI. It included a more efficient StreamReader.ReadToEnd implementation, and I put it together simply from reading the documentation
|
|
|
|
|
Yes it is enough for 6 month, well at least for you. I'm guessing you have to ask for each loc, and each answer will take up to 1 day (since you have to learn to ask a correct question at cp). An FTP client consists of 150 lines, so this will end in 150 days, leaving thirty days to write the documentation...
|
|
|
|
|
SeMartens wrote: leaving thirty days to write the documentation...
So, thirty lines of documentation?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Are you the same retard posting over and over, or is there a whole class of morons asking the same question ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|