|
I'm trying to build a control inheriting from ComboBox.
Instead of having a list of items in the dropdown area of the underlying ComboBox, I would like to show a control there. How can I get access to this area, so that I can use it like a control container?
THANKS,
Tom
|
|
|
|
|
It's actually a control inside the combo box control, I believe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hmm... possibly so, but how do I get at it?
Again, what I want to do is host controls (actually buttons) on the dropdown area. In other words, I don't want to display the normal ToString() manifestation of objects in the Items collection.
Thanks,
Tom
|
|
|
|
|
Hi,
I followed a guide about BinarySearchTrees from MSDN:
http://msdn2.microsoft.com/en-us/library/ms379573(VS.80).aspx
The source code is provided:
http://download.microsoft.com/download/5/0/f/50f7b985-990b-4154-ac21-518bfe16f887/datastructures20.msi
Well, i'm just interested in the BinarySearchTrees, so i imported the correspondent files to my project.
Everything was compiling fine until the next error appeared:
<br />
Error 1 'CoordinatorLayoutEditor.Structures.BinarySearchTree<T>' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'. 'CoordinatorLayoutEditor.Structures.BinarySearchTree<T>.GetEnumerator()' is either static, not public, or has the wrong return type. D:\Os meus documentos\Visual Studio\CoordinatorLayoutEditor\BinarySearchTree.cs 18 18 CoordinatorLayoutEditor<br />
I don't know what to do since the methods are defined there!
<br />
public virtual IEnumerator<T> GetEnumerator()<br />
{<br />
return GetEnumerator(TraversalMethod.Inorder);<br />
}<br />
<br />
<br />
public virtual IEnumerator<T> GetEnumerator(TraversalMethod TraversalMethod)<br />
{<br />
<br />
switch (TraversalMethod)<br />
{<br />
case TraversalMethod.Preorder:<br />
return Preorder.GetEnumerator();<br />
<br />
case TraversalMethod.Inorder:<br />
return Inorder.GetEnumerator();<br />
<br />
case TraversalMethod.Postorder:<br />
default:<br />
return Postorder.GetEnumerator();<br />
}<br />
}<br />
Any tips?
Thx,
Nuno
|
|
|
|
|
I'm tyring to access a tablerow's text in C# to change it. I know I can do it by simply typing table_row_name.Text; BUT, I have so many different table rows that it would be easyer to use a loop and adentify them with a string rather than directly. HOW CAN I DO THIS?
I've tried using ((TableRow).FindControl("FCFC1").Text) = e.Row.Cells[1].Text;
as a test.... but I get this error: "CS0118: 'System.Web.UI.WebControls.TableRow' is a 'type' but is used like a 'variable'"
HELP ME OUT PLEASE
Stuck in a trans from asp to asp.net
|
|
|
|
|
cablesforless wrote: ((TableRow).FindControl("FCFC1").Text) = e.Row.Cells[1].Text;
Well, of course. That's what you've said, that TableRow is a variable. You can use foreach to iterate over the rows, and then use code like this, replacing TableRow with the name of the variabgle that hodls the row.
Probably
e.Row.FindControl("FCFC1").Text = e.Row.Cells[1].Text;
Of course, your code would be better if it was not on one line, and it made sure that a control was found.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm sorry, I just so new to this stuff guys be easy on me.
I'm accessing it from the OnRowDataBound Event from a Datalist, and throwing the values over to the table. How would I go about usuing your method if I'm already stuck in an event? Very puzzling to me.
|
|
|
|
|
Sorry, I should have spotted that. The code I gave you:
e.Row.FindControl("FCFC1").Text = e.Row.Cells[1].Text;
will use the actual row from the event handler, and would not work with foreach.
I do worry when people are trying to handle event driven software development and can't decipher a problem like this. Only because it seems people are often jumping in too deep and not fully learning the basics first.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Well, you have to start somewhere... I can only try. Most people learn by example and don't take every Microsoft Class before trying a little but of trial and error.
The world is filled with people who try .
Also, I'm fully aware of what your little snippet does. I guess my question is how to use it. The TableRow doesen't have an OnTextChange event. How do I make create that function?
|
|
|
|
|
cablesforless wrote: Also, I'm fully aware of what your little snippet does. I guess my question is how to use it. The TableRow doesen't have an OnTextChange event. How do I make create that function?
It can only work inside the event you refered to originally, that's the only place that e exists with the property to return the row.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, i would like to create a program to generate a string from characters given, example given with "mnopqrsdef", it will form words out of it.. like "more".. any idea?
|
|
|
|
|
A brute force approach generates permutations of all the subsets and matches them against a dictionary.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Well, first of all, i think you'll need a reference, like a word database or something.
There are a lot of those things around in open source dictionaires.
You'll then need to filter from that database the words that contains characteres from the string you provided.
For example, you pick in the word "more". It contains the letters 'm', 'o', 'r' and 'e'.
You'll pick up your string and find if it contais those letters. If it has, it can go for the result pool.
Hope it helps,
Nuno
|
|
|
|
|
How do I play animated gif or an avi clip in a Form?
_____________________________
...and justice for all
APe
|
|
|
|
|
In the case of a avi, you'll need to drop out a media player to the form.
You can activate the media player component, clicking with the right button in the tool box and click again in "choose items", and then, in components, choosing the windows media player.
After that you'll need to explore the api in order to play the movie.
Pretty simple!
For the gif, maybe a picture box will do it.
Nuno
|
|
|
|
|
There are classes for animated gifs on this site. No, a picture box won't do it, it will just show the first GIF.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I can't find any...
_____________________________
...and justice for all
APe
|
|
|
|
|
Hello all,
Quick question really, hopefully it has a quick answer.
I am using the .NET installutil application to install and register a c# based Windows service. This works like a dream, however when I use this application the service is started after install. This is something I do not want to happen until later in the application install.
Does anybody know of a way of setting the service installer to not start the service on install without changing the ServiceStartMode from Automatic?
|
|
|
|
|
You really don't have a choice. Reset the ServiceStartMode to Manual, then finish whatevr you have to do, then you have to supply code to go into the Service Manager and change the startup mode to Automatic.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I was trying to trigger a event for the del key.
But, as other keys it does nothing.
Del is not a keypress event?
Thx,
Nuno
|
|
|
|
|
I think you have to override the ProcessCmdKey method.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Sorry, i don't know what to do with that answer. Can you be more specific?
Thank you very much
Nuno
|
|
|
|
|
If you overload that method, it will recieve the Delete key. I thought OnKeyDown would also receive it, however.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry, i still don't get it.
This is my handler:
<br />
private void deleteRegion(object sender, System.Windows.Forms.KeyPressEventArgs e)<br />
{<br />
<br />
MessageBox.Show(e.KeyChar.ToString());<br />
<br />
SplitContainer sc = (SplitContainer)sender;<br />
<br />
MessageBox.Show("I will delete " + sc.Name);<br />
}<br />
How do i do what you say?
Thx,
Nuno
|
|
|
|
|
sinosoidal wrote: Can you be more specific?
Actually I was specific. Maybe you need a sample:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if ( keyData == Keys.Delete)
{
MessageBox.Show("DEL pressed");
}
return base.ProcessCmdKey(ref msg, keyData);
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|