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.
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.
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.
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
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
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 (http://www.opendcl.com/forum/index.php?topic=1061.0)
This may solve a potential issue.
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)
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.
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
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.
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.
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
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.
hi owen,
sounds good!
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
For true color you're stuck with the raw text, because true colors are complex types (RGB, ACI, or color book).
thanks owen,
think i am experienced enough to make workarounds.
i dont like quick and dirty.
what i wan't is a solution quite right, without tricks.
special the label data for color is depending on localization.
for labeling that makes sense an is welcome, but for programming there
should be the underlaying data available used in acad environment.
in this case the data returned from acad_truecolordlg.
Perhaps you could change the cell style to 4 and use your own ButtonClicked event handler to display the true color dialog.
hello owen,
thanks for the tip, but how can i distinguish between more than one of my own subtypes( maybe 31 for true color, 32 for lineweight and 33 for linetype). can userdata assigned to a colum or cell for coding that?
btw: dcl_grid_addstring does not trim leading and trailing space.
please have a look at my last sample( first tab - third column textstyle)
lg
If you don't want to hardcode your cell positions, you could coopt the CellDropList for extra identifying information. I don't think AddString should trim leading and trailing spaces. Do you think it should?
hi owen,
yes i think so. addstring and insertstring should, because there are delimiters.
if there are WS as delimiter its a must. it makes only sense for the labels
if the font is a fix font then you could use SP for offset, oh no.
greetings from the old punchcards.
i believe not to distiguishe between '' and ' ' meaning data is 'nil' or 'blank'.
that should be the same.
lg