problem with grid and acadstyles

Started by grrrr, January 08, 2010, 12:17:09 PM

Previous topic - Next topic

grrrr

hello,

i try to program a grid with column styles depending on acad like acadlayer, linetype lineweight, textstyle. a sample is attached.
now the problems i run into:

- problems with calculating the columnwidth on that acadtype styles
  because they are solved by pulldowns and containing an image.
  perhaps the solution is use of separate dialogs like colortype does.

- clicking on lineweight-button version 6.0.0.18 has problems. the dialog hung and must be 
  escaped.

- if you click an acadtype button the old value is lost.

- ...GRID1_OnButtonClicked is not called by button click.

- row data read by   (dcl_Grid_AddString gridcontrol row ";") ignores parts
  without text.  aa;bb;;;;ff is parsed as "aa|bb|ff|  |  |  "  instead of  "aa|bb|  |  |  |ff".

- if click on an acadtyped button the previous value is cleared. please look at layertype
  there should be a way to handle undefined values like an empty datafield or an not existing layer
  or simply 'no data set'. that should be kept until the user takes an existing value.



owenwengerd

Quote from: grrrr on January 08, 2010, 12:17:09 PM
- clicking on lineweight-button version 6.0.0.18 has problems. the dialog hung and must be  
 escaped.

I could not reproduce this in AutoCAD 2010.

Quote from: grrrr on January 08, 2010, 12:17:09 PM
- ...GRID1_OnButtonClicked is not called by button click.

You need cells of style 4 for that event to be fired.

Quote from: grrrr on January 08, 2010, 12:17:09 PM
- row data read by   (dcl_Grid_AddString gridcontrol row ";") ignores parts
 without text.  aa;bb;;;;ff is parsed as "aa|bb|ff|  |  |  "  instead of  "aa|bb|  |  |  |ff".

This should be reported as a bug.

grrrr

hello owen,

thanks for reply.

i have tested with bricscad 10
  clicking on lineweight-button version 6.0.0.18 has problems. the dialog hung and must be 
  escaped.


does not fail with 6.0.0.16
  clicking on lineweight-button version 6.0.0.18 has problems. the dialog hung and must be 
  escaped.

Kerry

Quote from: grrrr on January 08, 2010, 12:17:09 PM
- clicking on lineweight-button version 6.0.0.18 has problems. the dialog hung and must be 
  escaped.

The LineWeight ComboBox (CellStyle 33) works as expected for me in 6.0.0.18 , Acadm2010 WinXP32
Perfection is not optional.
My other home is TheSwamp

Kerry

Quote from: grrrr on January 08, 2010, 12:17:09 PM
hello,

- if you click an acadtype button the old value is lost.


The ComboBox CellStyles ( 21 27 30 32 33  ) in your sample all work as expected for me in 6.0.0.18 , Acadm2010 WinXP32
Perfection is not optional.
My other home is TheSwamp

Kerry


General note:
Are you pressing ENTER in the Grid Controls ??

To stop the form closing refer FAQ
Question: How can I prevent the form from closing when the cursor is in Grid or Textbox control and I push Enter key?
http://www.opendcl.com/forum/index.php?topic=1061.0

This may solve a potential issue.

Perfection is not optional.
My other home is TheSwamp

grrrr

hi,

with a2007 there are no problems with showing the comboboxes

with brx10 on lineweight an error occures ( 2 attached jpg)
with brx10 no linetypes are displayed ( 1 attached jpg)


owenwengerd

These controls are not yet fully implemented in Bricsys. I've made some effort to prevent serious crashes when using them, but the problem cannot be completely resolved until those controls are fully implemented in Bricscad.

grrrr

hi owen,

thanks for reply.
do you write a bug report for bricscad or should i do that.

the popup for the layerstyle has only the width of the column.
on linetype or lineweight the popups are expanded.
please note the pictures


owenwengerd

Bricsys is already aware of the problem with the AcUi controls. The dropdown width issue should now be fixed in Alpha 19. I've also fixed the AddString parsing bug, so it should now correctly parse "empty" tokens in the delimited string.

grrrr

hi owen,

i have tested in 6.0.0.19
the addString parsing bug with empty tokens works well,
the dropdown width and height too.
on bricscad the lineweight control still fires an exception.

thanks for your fast reaction.

grrrr

hi,
i have tested around with gridstyles but i am not happy about.
all gridstyles based on not native string data are not well supported.
the autocad data is missing and can't be got.
what shall i do with 'rot', 'grün', 'blau', vonlayer for acad_colordlg?
maybe written in japones. thats not what acad supports.
what i want for color is 0,1, ...256....
the original acad data, not the label.
the same story occures with acad_truecolordlg or other controls.
there should be something like dcl_grid_cellvalue available.
but the input should be changed from labeldata to valuedata
now it works for colordata like 0,1,2,...256... but the reverse operation
is not available. i get 'rot',grün'... vonlayer.

the solution could be input and output for those who want to deal with labeldata
as is and additional api calls for those who will deal with internal data like
((62 . 112) (420 . 1762913)) as string for truecolor
or 0, 1 for checkboxes.

i have added sample code for testing

owenwengerd

See if Grid_GetCellImages returns the values you're looking for. In "special" cells, the cell image value is coopted for the associated integer value.

grrrr


grrrr

hi owen,

sorry that failes
for true color the return is always (-1 -1).
for ac color 155 the return is (155 -1)
now i will test other ones