Problem with creating columns at runtime

Started by tlindell · 2007-08-25 03:23 UTC · 5 replies · SMF topic #49

Attached is a simple dialog with two grid controls.  Normally, I like to set up my columns in the Editor so there is less scripting involved, but I have a situation where I don't have a fixed number of columns.  One of the grid controls has the column set by the editor, the other has the column made at runtime.  The one made at runtime is having serious issues displaying the selections, both were having problems editting the text correctly (although this is the first time I had it with the pre-made one).

Hopefully I got the formatting right for importing/unloading the odcl project.
(using 4.0sp1)

[attachment deleted by admin]
author=tlindell link=topic=49.msg211#msg211 date=1188012208 wrote:
The one made at runtime is having serious issues displaying the selections, both were having problems editting the text correctly...


I took a quick look at your file, but I didn't notice anything extraordinary. Please describe in more detail what the problem is and how to reproduce it.
The following screenshot shows the dialog twice, one is marked up.

In the righthand column, the selected choices are shown correctly in each cell, in the column to the left, the selected choices are coming back blank or incorrectly.  In either column that has the cell style for string, when I go to edit the string, I see a shift in the text, the first one (sometimes two) letters appear echoed.  Three of the cells in the left side are the different styles for selecting colors.  Both the color picker and color dropdown do not display the selected color.  The true color cell displays the RBG value, but not the color box.


[attachment deleted by admin]
I made some changes to the code for testing.  I was still trying to figure out the proper way to import the project on my work computer which has AutoCAD and my home computer which has access to the forums, but no AutoCAD to verify the code changes.  So maybe my revisions between computers didn't load and run.  I was able to figure it out this time on my work machine and attaching that code.

The command to run it is "tgrid".  Try picking the first four cells in the left column and compare the selected results to the right column.  If this doesn't show the problem, then could it be that it is fixed in the 4.1 alphas?


[attachment deleted by admin]
I think I need to completely rewrite the grid control code. As it is now, it's practically impossible to maintain. Stay tuned for Alpha 5. :)
I know what it's like to re-write something which is what I'm in the middle of right now thanks to OpenDCL 8)  It will be so worth it though!

Grid controls have been my favorite control at this point in time, so I wish the best in your efforts and look forward to grid control improvements. ;D