General information
Category:
Coding, syntax & commands
>working on a grid class which will handle "building" itself dynamically.
>(not using a builder, as i want to have it as a class)
>
>Basically, my plan is to be able to drag a table or view from the
>DataEnvironment onto a form and NEVER <s> have to touch it again.
>
>Here are my current needs:
>
> 1. For the columns' current control(s) i need to be able to place code
>into several methods of the default control (ie. the textbox). How do you
>do this? Or is it possible to have the dropping of the table/view use my
>class of textbox.
>
> 2. "Intelligently" use the correct control based upon the columns' source.
>(ie. checkbox for logical, ...)
>
>kim
Have some of the similar needs and this is how I've done it. I'm sure that you'll get other suggestions. My grid has a property called aColumns which is an array of settings for a column definition. You can either manually fill this array or use =AFIELDS() with DBGETPROP() to get other characteristic automatically and build it that way. I have a method called .MakeColumns that will use the above mentioned way to construct a grid from a view. I then have a method called .BuildMe which reads thru aColumns and constructs the grid. Works good. To start this, I have a subclassed grid which has 25 predefined columns.
I have header code to sort and it will do incremental searching as I've removed the Text1 standard control with a custom textbox control.
Steve Despres
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only