Thanks a lot, Eric. This helps a bit. I have compared your XML to the code form 
my shape and noticed that the <textbox> node is not included in my shape. 
Instead, it is using an svg:text element, which apparently is not recognised 
correctly by Dia. If I enter the textbox node into my XML, I can enter text 
into the shape alright, except that I don't know how to specify the formatting 
or the default text. 

Is this documented anywhere? I tried here, but couldn't find anything on the 
required additional options for the textbox element: 
http://git.gnome.org/browse/dia/tree/doc/custom-shapes

Cheers, 

Martin
 
 
Am 30.09.2012 um 22:49 schrieb Marchand Eric:

> Le 30/09/2012 22:04, Martin Wunderlich a écrit :
>> Hi all,
>> 
>> I have been trying to create custom shapes where the user can enter text 
>> (see my other postings about the recipe diagrams). However, editing text 
>> doesn't work once those custom shapes are added to a doc.
>> So, I have cut it down to the essential to find out where the error might 
>> be. Here is what I did:
>> - Create a new diagram with one shape from the flow chart collection 
>> (rectangle with text).
>> - Save the diagram as diagram.
>> - Export as shape.
>> - Create new folder in the directory .dia/shapes/ called "Test"
>> - Save exported shape PNG and XML in this directory.
>> - Create new sheet called "Test".
>> - Edit the sheet's XML to reference the custom shape in the "Test" directory.
>> - Restart Dia.
>> 
>> Now, when you drag the test shape onto the drawing area, you can see the 
>> shape, but not text is editable.
>> Could anyone please tell me why?! I am also attaching the test shapes.
>> Thanks a lot.
>> 
>> Cheers,
>> 
>> Martin
>> 
> Hi,
> I don't know if I understand correctly your problem, but here is a shape 
> where the user can enter text.
> 
> eric
> 
> **************************
> <?xml version="1.0" encoding="UTF-8"?>
> <shape xmlns="http://www.daa.com.au/~james/dia-shape-ns"; 
> xmlns:svg="http://www.w3.org/2000/svg";>
>  <name>Test - Test</name>
>  <icon>Test.png</icon>
>  <connections>
>    <point x="0" y="1"/>
>        <point x="1" y="0"/>
>        <point x="1" y="2"/>
>        <point x="2" y="1"/>
>  </connections>
>  <aspectratio type="fixed"/>
>    <default-width>2</default-width>
>    <textbox resize="no" x1="0" y1="0" x2="2" y2="2"/>
>  <svg:svg>
>        <svg:circle cx="1" cy="1" r="1"/>
>  </svg:svg>
> </shape>
> _______________________________________________
> dia-list mailing list
> dia-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
> 

_______________________________________________
dia-list mailing list
dia-list@gnome.org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia

Reply via email to