Re: Problem creating custom shapes with editable text
- From: Marchand Eric <ricoh51 free fr>
- To: dia-list gnome org
- Subject: Re: Problem creating custom shapes with editable text
- Date: Sun, 30 Sep 2012 22:49:41 +0200
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>
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]