Author Topic: MText in custom object  (Read 2195 times)

0 Members and 1 Guest are viewing this topic.

Draftek

  • Water Moccasin
  • Posts: 1501
MText in custom object
« on: May 05, 2006, 10:24:17 AM »
I'm proto-typing a custom object similar to a table.

Like the rows in a table, I want word wrap to expand the height of the relative row but not change the column width.

I was thinking of using a sub-entity of MText type since using the .Geometry().text method of worlddraw would require me to do a lot of work on the text strings. Since I'm just a C++ hack I'm finding strings the hardes thing to deal with. Especially since 2007 is requiring all UNICODE.

The question is, instead of using MText do you think it would be possible to derive from AcDbBlockReference to use an actual table object? Since AcdbTable is derived from AcDbBlockReference, does that sound doable?

I've never played with deriving anything except acdbobject or acdbentity.

Thanks
Soli Deo Gloria

MickD

  • Gator
  • Posts: 3244
  • !false...it's funny 'cause it's true!
Re: MText in custom object
« Reply #1 on: May 05, 2006, 09:06:53 PM »
hmmm, it sounds like you just need a table??
What other functionality do you need other than that provided by the table object?

If you just want to add additional functionality to a table you could derive directly from a table object, override some of its functions if neccessary and add your own functions as required.
Deriving from standard arx objects is pretty straight forward, you just need to remember to call the base objects functions in your overridden functions so that they behave properly (such as filer calls etc).

hth.
A programmer's wife tells him, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen."

The programmer comes home with 12 loaves of bread.

Draftek

  • Water Moccasin
  • Posts: 1501
Re: MText in custom object
« Reply #2 on: May 05, 2006, 11:06:26 PM »
ah! I didn't see the table object in the wizard so I assumed....

Thanks, I'll try that. Your right I just need a table object that the user must use my interface to manipulate.

I'm excited now.
Soli Deo Gloria