main logo
Subject: Re: Too Easy
Author: graeme thomson
Posted: 2001/09/20 21:03:44
 
View Entire Thread
New Search



</font></i>Hey Graeme,
Thank you for the reponse. I have read many of your responses over the past year, which have been a great help to me (as well as this Forum in general). I have learned a great deal, and have grown in my appreciation of this framework and of all the help given to those of us getting used to using this framework. But, I am a little unsure about how to do what you propose.
The first problem I have is actually displaying a calculated value in a grid cell/column, without doing it in a view. I cannot put the calculation in the ControlSource, because it is not a variable. I cannot set the ControlSource of the column (or the textboxes individually) to an array of calculated values (even when it is calculated on the fly or in the form init). This, of course, is my main dilemma.
The second problem I have is changing the atrtributes of a particular cell in the grid. How can one address a cell like that? Is it the Visible property of the text box that is being changed or the CurrentControl of the column, or both?
Which leads to my third problem, which is how to have multiple controls being used within the same column?

yes, you are absolutely correct. Simple is often best. I was extrapolating an idea I used for something else entirely without seeing the simple approach.
However, in answer to your question, to add a new control (or to change one). First make sure the control you want to remove (if you are changing one) is the selected on in the properties box. Click on the class bar Then press Delete. It should disappear from the column.
To add a new one, select the column you want in the properties box, click on the class bar. Take the control you want from the form controls toolbar and click in the column. voila!!!
You can add multiple controls to a column this way.
You may know most of that but I am sure it will help someone.

to reference the controls you need to run back up the hierarchy:
container:grid:column:control. I have found it difficult to reference grid controls unless from a parent container. Trying to do it within the grid seems to 'confuse' the grid.

It is the visible property of the textbox which is referenced.
As I said this technique works well if you want to use a combobox to change a column value but doing this causes refresh() delays so overlaying with an already propulated textbox (created in the initial view) solves the problem.
 
©2001 graeme thomson
<-- Prior Message New Search Next Message -->