Discussion:
wxRichTextCtrl - How to bottom-align floating images?
Eric Jensen
2014-09-18 11:08:22 UTC
Permalink
Hello,

is is possible to have a floating image in a wxRichTextCtrl to be
bottom-aligned?

I tried this, but the images are always top-aligned

// ---
r.Newline();

wxRichTextAttr imageAttr;
imageAttr.GetTextBoxAttr().SetVerticalAlignment(wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_BOTTOM);

r.WriteImage(wxBitmap(zebra_xpm), wxBITMAP_TYPE_PNG, imageAttr);
r.WriteImage(wxBitmap(smiley_xpm), wxBITMAP_TYPE_PNG, imageAttr);

r.Newline();
// ---

Thanks,
Eric
--
replace .local with .de to reply to my email address
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Julian Smart
2014-09-18 14:43:26 UTC
Permalink
Hi Eric,

No, I'm afraid not, but you can adjust the relative position to move the
floating image relative to its anchor paragraph.

BTW I have just fixed non-floating image vertical alignment 3.0 and 3.1 SVN.

Regards,

Julian
Post by Eric Jensen
Hello,
is is possible to have a floating image in a wxRichTextCtrl to be
bottom-aligned?
I tried this, but the images are always top-aligned
// ---
r.Newline();
wxRichTextAttr imageAttr;
imageAttr.GetTextBoxAttr().SetVerticalAlignment(wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_BOTTOM);
r.WriteImage(wxBitmap(zebra_xpm), wxBITMAP_TYPE_PNG, imageAttr);
r.WriteImage(wxBitmap(smiley_xpm), wxBITMAP_TYPE_PNG, imageAttr);
r.Newline();
// ---
Thanks,
Eric
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Eric Jensen
2014-09-18 17:51:13 UTC
Permalink
Hello Julian,
Post by Eric Jensen
is is possible to have a floating image in a wxRichTextCtrl to be
bottom-aligned?
JS> No, I'm afraid not, but you can adjust the relative position to move the
JS> floating image relative to its anchor paragraph.

JS> BTW I have just fixed non-floating image vertical alignment 3.0 and 3.1 SVN.

Thanks a lot, it works now.

Eric
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...