Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic text + picture in boxes (Read 5402 times)
jsamba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Aug 17th, 2007
text + picture in boxes
Aug 27th, 2007 at 1:55pm
Print Post  
It would be great to be able to have a box with both text AND picture, not overlapping, without having to use a table which is a lot of overhead, and which waste space (see another topic: http://mindfusion.org/cgi/Forum/YaBB.pl?board=fcx_disc;action=display;num=118745...) Wink
One should be able to choose the layout (top, left, bottom or right of picture) and alignement (centered, left, right) of the text to the picture ...

That would be
great
!  8)
  
Back to top
 
IP Logged
 
Michael Pfeifer
YaBB Newbies
*
Offline



Posts: 22
Joined: Mar 24th, 2006
Re: text + picture in boxes
Reply #1 - Aug 28th, 2007 at 3:43am
Print Post  
Hello,

I actually never worked with tables, so I can't say anything about your approach.
But when hearing about "text + picture" and "not overlapping", I immediately thought that is exactly what I am doing right now.
I use the Group mechanism and the AttachTo() or AttachProportional() for combining several items (boxes containing text and others containing images) and let them behave like one single item.
Check it out it works like a charm.

Cheers,
Michael
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text + picture in boxes
Reply #2 - Aug 28th, 2007 at 5:35am
Print Post  
Hi,

You could create a custom ShapeTemplate and define the regions where text and image are displayed via the AddText* and SetPictureRect methods.

Stoyan
  
Back to top
 
IP Logged
 
jsamba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Aug 17th, 2007
Re: text + picture in boxes
Reply #3 - Aug 29th, 2007 at 12:22pm
Print Post  
Thank you capitan,

using the group mechanism is a good idea, albeit somewhat more complex that the simple feature I require (because then you have more objects with special relations between them ...)

Adding a CustomShape as Stoyo suggests might do the trick. However, how can I do that?
Can this be done with VB?

Thank you all!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: text + picture in boxes
Reply #4 - Aug 29th, 2007 at 12:34pm
Print Post  
Try this:

Code
Select All
Private Sub Form_Load()
    fcx.Graphics.StartUp geGdiPlus
    'fcx.LoadFromFile "D:\test.fcx"

    Dim st As New ShapeTemplate
    st.AddOutlineStraight 0, 0
    st.AddOutlineStraight 100, 0
    st.AddOutlineStraight 100, 100
    st.AddOutlineStraight 0, 100
    st.AddTextStraight 50, 0
    st.AddTextStraight 100, 0
    st.AddTextStraight 100, 100
    st.AddTextStraight 50, 100
    st.SetPictureRect 0, 0, 50, 100
    st.CompleteDefinition "ImageLeftTextRight"

    Dim b As box
    Set b = fcx.CreateBox(50, 50, 180, 120)
    b.Shape = fcx.Shapes("ImageLeftTextRight")
    b.Text = "It would be great to be able to have a box with both text AND picture"
    b.TextStyle = tsFitPolyCenter
    b.Picture = fcx.ScriptHelper.LoadImageFromUrl("http://mindfusion.org/screenshots/costing_planner_small.jpg")
    b.PicturePos = picFit
End Sub
 



Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint