|
Alternatively of course, if I can just hide the drop down button, I can stifle the drop down behaviour.
So, I'm either looking to hide the list portion in ComboBoxStyle.Simple mode, or hiding the dropdown button...
|
|
|
|
|
How about:
if (! zEnabled)
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
else comboBox1.DropDownStyle = ComboBoxStyle.Simple;
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Hi, thanks for the reply.
That's pretty much what it's doing at the moment. The problem is that in 'Simple' mode, the list is displayed as a box below the selection box permanently. It's this bit that I wish to remove, so that the combobox appears like a normal text box.
|
|
|
|
|
Hmmmm. In my test it doesn't show the list at all. It just appears like a TextBox but lets you scroll through the list items with the arrow keys. Did you perhaps set a size parameter or number of items to show?
I simply grabbed a ComboBox and put it on a Form, added a few items, and made a button that changed modes as above to test the behavior.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Interesting... it does appear to behave itself throughout the program with a pre-designed ComboBox.
However, if I dynamically create a custom ComboBox in code, and change the ComboBoxStyle, the list will not disappear. I've tried adjusting the size of the box but this has no effect, they always appear with an ugly big box underneath.
Why would it do this only for dynamically created ComboBoxes?
Thanks for looking at this with me, it's much appreciated.
|
|
|
|
|
My guess, based on experience, is that there's probably some default parameter in the pre-designed and dynamically created controls that is different, but I have no idea which one.
I've run into that problem with other controls before and tracking down the parameter was tedious. Perhaps you could put a pre-designed control on a form, then add a second one dynamically, then stick in a break point and examine all the parameters one by one to see where the difference is.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I'm getting the impression that when the component is initially drawn in simple mode it is drawing to a default size - I'm getting around it at the moment with a 'bodge' where I'm explicitly resizing the boxes after they have been drawn - not idea, but it acheives the result.
If I get some I'm going to examine the parameters as you suggested.
Thanks for all the suggestions and help.
|
|
|
|
|
This is a bit of an odd question, but can I select a new row in a dgv and clear the old selection as an atomic operation? I can do it in two statements but that results in the SelectionChangedEvent firing twice.
dgv.ClearSelection();
dgv.Rows[e.RowIndex].Selected = true;
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I don't believe that you can.
It is possible to override SetSelectedRowCore where you could put the ClearSelection , but that would, to all intents, be the same as having MultiSelect = false
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Can anybody have code , of retrieving the signatures in c# in OUTLOOK 2007.
i am developing an addin in outlook 2007,which sends email
but what i want is that default signature of the sender should be send automatically with each email message.
Regards
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
|
ok , don't give me any code any suggestion.
Please don't give this useless reply.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: Please don't give this useless reply
Hardly useless. There you will find poeple who will be only too happy to work for you.
Of course, they will want paying...or had you noticed that?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
It's the most useful reply you will get, trust me.
Either go to rentacoder, or give your client back his money and let someone willing to do research or someone with prior knowledge benefit from their talent. Not a hack like you trying to get free code to profit off of it.
|
|
|
|
|
what is the problem with u , i don't know i think you may be a frustrated coder who are not getting projects from retacoder and for your kind information this not of any client project but it is a project which is asked by my boss, he wants me to develop an addin in outlook which allows him to send multiples message to clients , but not using bcc or cc.one client should get one message and their mail id should be in To:.
I think it is enough for you to understand , dont make this forum ugly for the first time in 2 years i got reply like i too have given critical codes to many fellow members but i didn't ask them blah blah blah.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: what is the problem with u
That people like you come and demand code, and you get pissy when you don't get it.
Mogaambo wrote: i don't know i think you may be a frustrated coder who are not getting projects from retacoder
I'm not registered on rentacoder, or I might be, but I have never used the site itself. It's where I redirect tools such as yourself to get work done without trying to rip someone elses work and pass it off as your own, as you admitted to doing here ...
Mogaambo wrote: his not of any client project but it is a project which is asked by my boss
... and to that effect you should get fired.
Mogaambo wrote: dont make this forum ugly
Why would I do this? You're doing a fine job at it yourself.
Mogaambo wrote: i got reply like i too have given critical codes to many fellow members
I went through your posts, and no, you haven't. Not once.
|
|
|
|
|
EliottA wrote: That people like you come and demand code, and you get pissy when you don't get it.
I am just asking has any one done that before bcoz i googled alot and i didn't came up with an answer,
<blockquote class="FQ"><div class="FQA">EliottA wrote:</div>... and to that effect you should get fired. </blockquote>
Why would i, did you know all the answers of c# are you a master or architect of c# who knew every thing or u r genius by birth.I dont know
my boss always happy on my work and i gave him job done in deadline .
Did you not google if you don't know the answers, did u not turned down to codeproject like forums to know your answer.
EliottA wrote: I went through your posts, and no, you haven't. Not once.
I told u i am talking of critical codes which i gave them when they asked me thru email, whether it is paypal code or wire transfer code, i always help to those who asked me thru email.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
I don't realy understand your attitude: a quick Google gave me two different solutions to your problem. Ok, not in C#, but .NET is .NET is .NET so it would be transferable.
If you didn't "get pissy" as EliottA says, I might have expanded on this, but Hey! I can't be bothered!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Don't listen to them, there just grumpy because they don't like answering gradeschool theory.
Here's the code[^] and it's gratis.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You just wasted 3 minutes of my life. But, I can say I know everything I didn't know about currency codes now.
|
|
|
|
|
Come on clever pants! If the time was WASTED how come you KNOW something NEW?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi Mogaambo,
Ignore the hostile members. I think its perfectly fine to ask for code snippits from fellow software engineers.
If you want just the signature you can follow the instructions provided [^]by Tim Li over at the Microsoft forums.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi all, I'm looking for a class that works like TimeSpan but only takes account of a specifiable working week, so that if you add 12 hours onto 9AM Monday it returns 1PM Tuesday, or if you add 12 hours onto 9AM Friday you get 1PM Monday for a 5-day week, 9-5 working day.
Does such a thing exist?
TIA
|
|
|
|
|
Haven't seen one yet.
BTW: It would be similar to DateTime, not TimeSpan, as TimeSpan does not know what the current day is. (That is why it has TotalDays but no TotalMonths).
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
It's more like a TimeSpan whose duration varies according to the DateTime it's being added to! (or possibly )
|
|
|
|