Hi
Thanks for the quick reply.

The first issue i solved with getting the text, as I have only textboxes and
rectangles.

The second issue:
I have already gone through the link you have added.
I can add a new text box by setting text to it.
But suppose if I have a textbox with the text "Default String" and I want to
update it to "Updated String", how it can be done??

Right now what I am doing is that I am retrieving the anchor of the textbox,
then deletes that textbox and then creates a new textbox with my text and
places it in the saved anchor. Is there any alternate way??

Also if you can excuse my knowledge in POI-HSLF, can u please solve the
following queries:

1) Can my textbox automatically adjust its size based on the size of the
text.

2) In the image part, can I put an image's URL just like

      int imgType = ppt.addPicture(new
File("http://www.thegreenhead.com/imgs/perpetual-motion-globe-2.jpg";),Picture.JPEG);

However this is not working for me :-(


Thank You





Yegor Kozlov wrote:
> 
> 
> 
>> Hi
>> I have created a new ppt from a template. This new file have textboxes
>> and
>> rectangles.
>> I want to update these contents dynamically.
> 
>> The problem is:
>> 1) How can I identify a particular control it is.(if there is 5 textboxes
>> and 5 rectangles then how I know it is a particular textbox)
> 
> It's up to you. For instance, you can identify them by the text value,
> e.g. if it is
> a TextBox and its value is "control1" then do something.
> 
> You can identify your controls by position:
> 
> java.awt.Rectangle anchor = shape.getAnchor(); //gets position in the
> slide
> 
> You can tag your controls with different colors: red, blue, ...
> 
>> 2) How can I set text to a particular textbox .
> 
> http://poi.apache.org/hslf/how-to-shapes.html
> 
> 
> Yegor
> 
>> Looking forward for reply/suggestions
> 
>> Thanks and regards
>> smg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Apache---HSLF----How-to-update-a-TextBox%27s-text-tp16446655p16467410.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to