For #2, select the column IN THE PROPERTY SHEET, choose a combobox from the controls toolbar, and click on the column. Then set CurrentControl on the property sheet.
This forum works best if you say what you've tried and what didn't work. We're good, but we're no substitute for a quick Google search.
I've tried changing the baseclass property in the second scenario. I've done multiple searches for the first and couldn't find much. Regarding #2, What do you mean by property sheet?
The baseclass property does not come into play so I'm not sure why you're trying to change it. But you apparently have requirements not already spelled out.
The issue here is understanding the basic containership model, but there appear to be other factors in play. Why don't you tell us what all of them are instead of making us guess?
If you want your notepad window to become Office Word, do you simply write "Word" on the canvas and it changes?
You can't change an existing control by changing it's baseclass property, this is not possible at all, not only because the baseclass property is readonly. Even if it would be writable, what is loaded into memory is a textbox, and changing it's baseclass from textbox to combobox would not change the object. This is almost as changing the label of something and expecting it changed. I dare to suggest you simply write a needed amount of money on your wallet or notes (why is it called notes anyway?). You see: Nothing works this way, not in reality or in a programming language.
If you want something else you use RemoveObject() to remove the unwanted control and AddObject() to add the wanted control. Before adding columns by adjusting columncount you can also specify a memberclass/memberclasslibrary to tell vfp what to use instead of the standard column with the standard textbox.
In short, deep dive into OOP, VFP9 is not FoxproDos. Forms are not screens.
To add an object to a column, you can use the column's Addobject() method.
Then set the Column's CurrentControl property to the newly created object's name.
And don't forget to set Visible = .T.
(Check the VFP help for Addobject, CurrentControl, RemoveObject.)
But a combobox in a grid is not a simple thing.
Better follow danfreeman's advice and give more details.
Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
Mr. Grahmann, welcome to the forum. I see you have already had a good answer to your earlier question about masking passwords, and you are getting some useful help with your grid question.
However, in order to get the best from the forum, you should avoid asking two separate unrelated questions in the same thread. In the current thread, you have asked about sending email and about using combo boxes in grids. There is no connection between these two topics. Posting these as separate questions would have made it easier for people browsing the forum to know what the thread is about; it would avoid cluttering the thread; and it would help other people who might have the same problem and are searching for a solution.
I definitely don't want to discourage you from posting your questions, but it would help you and help us if you observe this simple bit of advice.
Also, if you haven't already done so, you might want to take a look at faq184-2483.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.