|
I'm dynamically adding custom user controls to another user control which contains various flowlayoutpanels, and my problem is anchoring. I have to resize the flowlayoutpanels to fit the maximum width of the dynamic controls being added, and I edited all those controls to have proper anchoring so they resize while maintaining the UI look and feel desired.
This works great individually for each user control in design mode, but not when they are added to the user control which will contain them all.
All fun, but apparently anchoring to a flowlayoutpanel doesn't work (I have no idea why) and I was hoping someone has a workaround?
I'm already considering shifting to regular panels, but I'm reluctant to do this shift so quickly before inspecting other possible workarounds.
Docking doesn't work, the flowlayoutpanel can be anchored to the main User control and widens / shrinks as desired, but to reiterate the controls contained within the flowlayoutpanel, even with anchoring, do not have the desired behavior.
|
|
|
|
|
To quote from the MSDN Documentation for FlowLayoutPanel
Docking and anchoring behaviors of child controls differ from the behaviors in other container controls. Both docking and anchoring are relative to the largest control in the flow direction. For more information, see How to: Anchor and Dock Child Controls in a FlowLayoutPanel Control.
The link, from above[^]
That is all the help I can give, tried a FLP once and found docking etc. too much for my brain cell to cope with.
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.”
|
|
|
|
|
Gave you a 5 for the link, but I forgot to mention that I checked it out earlier with no avail to my dilemma.
Thanks though, perhaps a second read will help.
|
|
|
|
|
Hi all
if some one can plz send me program that play song and u can choose the song from a list
i wiil be glad i work whise Microsoft Visual Studio 2008
My e-mail: sagiklan@gmail.com
tnx sagiklan 
|
|
|
|
|
If you just want a light-weight method to play WAV files, then use the System.Media.SoundPlayer class. Otherwise, just embed a Windows Media Player control into your form
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
You can download the source code and compiled project here.[^]
|
|
|
|
|
EliottA wrote: You can download the source code and compiled project here.[^]
And another one from here [^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
sagiklan wrote: if some one can plz send me
How about using Windows media player? Nobody here is going top "send" you a program. Maybe you can try www.rentacoder.com to write you a program and you can pay them a fee for doing that.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I suggest you read the link in my post, it has the answer you need.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Perhaps you should've said 'my sig' instead. When i read this at first I thought you'd gave the answer in a previous code begging thread he made.
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
|
|
|
|
|
When I've said 'my sig' people have responded that they can't understand my answer, so I was trying something different.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hi everyone.
I'm given a project on C# to develop an advanced font dialog. Instead of the normal
window font dialog, im suppose to customized it by adding few more function by adding a text box to allow user to type in to test the font,
a code page to see the list of character, and the unicode subrange. Its just like integrating the window character map into the font dialog.
I know i have 2 approach to do this.
1. by calling up the original font dialog and start editing the form.
2. Create a new font dialog
Im targeting no 1 since to create a new one, i would have to link them up all together and have to find a way to get the fonts list in the computer.
Anyway, the big problem i have with choice no. 1 is:
1. I dunno how to call up the Fontdialog
2. Im not sure how to expand the font size to allow more info to be display there.
3. Lastly and i don't know how to call up the code page, unicode or even create a textbox that is linked with the "fontstyle", "font", "size" and etc.
I just hope anyone here can advice on the approach to do or give me a link that might help. Am not that good in C# but this project
is hand picked to me, so i have no choice. I spent the whole day trying to solve and search on google to no avail.
Any input will be helpful.
Thx for reading guys. 
|
|
|
|
|
Number 2 will probably be easier
something like
System.Drawing.FontFamily [] families = new System.Drawing.Text.InstalledFontCollection().Families;
Google a bit, probably easier then you think.
|
|
|
|
|
Try searching for "visual inheritance", there are some articles here that might be helpful.
only two letters away from being an asset
|
|
|
|
|
Hi,
I would start out with my own dialog and enjoy my freedom, rather than fighting the limitations of the existing dialog. And I would use the InstalledFontCollection class to get started.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I also think you should go for option 2, it will be cleaner and easier to maintain and as a plus you could put it up as an article here.
You should be able to get the list of available fonts like ElliotA showed you, and you can use the fonts in that list to set the font on a text box (Just a matter of copying all the properties in the Font object you have, to the Font property of the text box)
Remember, if you come across any problems that you can't find answers for, or there is something you don't understand you can always post another question.
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hang on...Let me get this straight. You want to "develop an advanced font dialog" by extending the existing one, but you don't know how to even open the existing one, extend it or even create a text box with the font name in it. Oh, wait, and you're "not that good in C#".
My advice is that this is not a project for people who are "not that good at C#". My advice is that you go back to your manager and tell him that you can't do this and see if you can get him to assign you a simpler project to begin with. You have to start with the simple things and build up to the complex stuff.
You can read about the FontDialog class here[^]
The FontDialog class calls into windows API's to display the inbuilt common dialog. You cannot directly subclass this from .net. Your best bet would be to write one from scratch, or find a pre built one available on-line.
Simon
|
|
|
|
|
I wish i could do as you said, get a new project to do.
However, this is my school project and the school pick everything
for me. I don't get a choice. Whats worse, my supervisor is not
even helping at all by sleeping at the back of the class.
Anyway, thx for the reply. I go by the advice and create a font dialog of my own. Also able to retrieve the system font.
Now the problem is i don't know how to apply the effects (font, style, sizes, script) to the sample box for the user to see the changes.
Any help?
Also i've search through google, and i just can't seem to find ways to retrieve or create the character set, character map or even the unicode.
|
|
|
|
|
I was wonder if anybody had example code for adding ups shipping to my webpage
Please help!!
|
|
|
|
|
Sorry, I don't have any sample code for adding UPS shipping to your webpage.
Don't UPS have documentation for their API? It seems like it is a bit of niche thing to need.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
I'm sure UPS do.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
hi every one
how to access unbound field crystal report and set data source in C#?
thanks a lot
|
|
|
|
|
I want to encrypt/decrypt some data with RSA. I have the private key (D and Modulus) and the public key (Exponent and Modulus) saved in text files.
When I tried to decrypt (encrypt data with private key) I tried to import RsaParameters with D and Modulus set to the values in the file and the other parameters set to null. On the Import method it throws a "Bad Data" Exception. It seems that I can only import RsaParameters when all of the parameters are set? Can I do it any other way?
|
|
|
|
|
Bad Data exception can occurs when your key is wrong. Your private key and modulus are binary data, perhaps they have been ASCII armoured in the text file?
|
|
|
|
|
I think that the error you are getting might be related to the length of the data you are trying to encrypt.
RSA was designed for encrypting/decrypting cryptographic keys, not data. I cannot remember off the top of my head the max length, but if you plough through the MSDN Documentation, it is in there somewhere.
As I said at the start this is only a MIGHT BE, but given that RSA has this length problem you would be better off switching to another encryption provider now, rather than wait till it breaks before doing so.
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.”
|
|
|
|