|
Hello,
I need a textbox control that operates like the "To" control in many email programs, (Outlook etc). I've had a good look around, but can't seem to spot one anywhere. I know I've posted this in General Discussions, but haven't received a response there. Sorry for the cross post.
If you understand how the To: or CC: etc controls in an Outlook New Mail operates, then you've basically got the requirements right there. It displays a list of objects, each represented by some underlined text. You can select, double click on the object's text, and it will display more information etc. You can drag and drop them between two similar controls (eg. from To to CC etc). Most importantly, you can't split up the text of an object - to the user, the text IS the object
I've got a good start on developing such a control, but I'm concerned about the full amount of support required for it. For example, undoing, intellitext etc. etc.
Thanks in advance for any help or pointers
Phil
|
|
|
|
|
This is definately something you need to write yourself. Undo is easy, just keep a history of what the user types in a list
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well i've almost go this treeview finished, it looks good now, got icons for different types of nodes, but when i click on a node, its icon gets changed to that of imageindex 0, and when i click another it changes back.
I don't know why it's doing this, but is kind of annoying, its not a priority or anything so...
|
|
|
|
|
Hello
TreeNode.ImgageIndex => Unselected state (You've done that!)
TreeNode.SelectedImageIndex => Selected state (You've forgot that!)
Regards
|
|
|
|
|
Aww, that means more effort.
Well thanks, you've saved quite a bit of time there.
|
|
|
|
|
Well i got this:
void TreeView1AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
{
this.treeView1.SelectedImageIndex = this.treeView1.SelectedNode.ImageIndex;
}
but it redraws the whole treeview (redraw, not rebuild) with a nasty flash, every time the SelectedImageIndex is changed, any way around this?
or do i just have to find another icon for the SelectedImageIndex?
-- modified at 20:38 Tuesday 22nd August, 2006
|
|
|
|
|
Hello
You should set the images when initializing the treeview for the first time only, not every time you select/unselect a node. Do this in your form's constructor, or the Form_Load event handler.
Besides you set the TreeNode.SelectedImageIndex, not TreeView.SelectedImageIndex. The latter is the default image displayed for any selected node, if the node doesn't have an images -will work fine if you have only one image for all selected nodes-.
Regards
|
|
|
|
|
I see, my mistake then
|
|
|
|
|
Happens all the time.
Why don't you post it Here[^]
Regards
|
|
|
|
|
Hi,
Does anyone knwo what the IsRequired property is supposed to do for the ConfigurationProperty attribute? If i omit a required property in the configuration file, it doesn't throw an exception nor does it go into OnRequiredPropertyNotFound -- what does setting IsRequired to true do then?
Thank you!
stephen
|
|
|
|
|
I know this sounds noob, but I'm missing something here and I can't figure out what.
I have a class (we'll call it myControl) that inherits from System.Windows.Forms.Control.
In myControl, I override OnPaint.
I then add an instance of myControl to a Panel, hoping to see it there. However, it doesn't show up. What am I forgetting?
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Nevermind. I guess you can't set a Control's size in its own constructor (or, can you?). Anyway, I guess I need to look over my math...
Thanks anyway!
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Hello
Heritos Gger wrote: I guess you can't set a Control's size in its own constructor (or, can you?).
Sure you can!! Why not?
Regards
|
|
|
|
|
I guess you can after all. My math was wrong with what I was drawing, so I was drawing stuff outside the bounds of the control.
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Is it visible ? I'd expect to see it, too.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Turns out my math was wrong with what I was drawing, so I was drawing stuff outside the bounds of the control.
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Hello,
Maybe you forgot to path, the base.OnPaint(..) in your "overrided"??? OnPaint Method.
All the best,
Martin
|
|
|
|
|
Turns out my math was wrong with what I was drawing, so I was drawing stuff outside the bounds of the control.
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Hi,
I'm having troubles finding information about drag&drop support for tray icons. I know you can drag&drop on a lot of controls in C#, but the events are not listed for the "notifyicon" (aka tray icon).
Has anyone tried this before ? Google didn't really help me on the matter either.
|
|
|
|
|
Hello
I guess you should handle the NotifyIcon.MouseUp event, but where to go from there is up to you
Regards
|
|
|
|
|
I don't think that'll work since you need to have something like the "DragEventArgs" to see which data is being drag&dropped.
And I don't know that much about changing controls to implement that into the notifyicon control
|
|
|
|
|
Hello
AFAIK and someone correct me if I'm wrong. Drag/Drop operation puts info about the dragged data in the clipboard if not the data itself. That's where the dropped in control knows what is dropped in it.
So, just try fetching them from the clipboard.
Regards
|
|
|
|
|
I need to be able to determine what user name a process is running under. I can get the process object by using...
Process[] p = Process.GetProcessByName("theprocess");
But I need to know if the process is running under the same user name as the account that the current user is logged in under. I know I can get the user name with Environment.Username, but I need to get the process' user name like Task Manager does.
Can anyone help?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Hello
Process[] p = Process.GetProcessByName("theprocess");
MessageBox.Show(p.StartInfo.Username);
Regards
|
|
|
|
|
I found a previous reference to that, but the StartInfo object that comes up in my IDE does not have a "Username" property.
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|