0

ミッドフォームでImageItemを作成していますが、テキストが次の行に折り返されると、画像が上に移動し、テキストが新しい行に表示されます。これを回避する方法はありますか?

例:

*Image*
this is a a test, hello
world, this is a test

私はそれがこのようなものである必要があります:

*Image* this is a test,
hello word, this is a test 

また

         this is a test, hello
*Image*  world, this is a test
         hello world

私の方法:

protected Item createItemWithIcon(String str, Image icon)
{
    Item item = null;
        item = new ImageItem(str, icon, Item.LAYOUT_VCENTER, "", Item.HYPERLINK);
        form.append(item);
    return item;
}
4

1 に答える 1

0

@sajid が既に述べたように、Canvas は 1 つのオプションであり、特定のテキストを画像に関連付ける場合は別の CustomItem になります。ただし、一般的なシナリオでは、画像の周りにテキストを流す方法はありません。フォームとレイアウトの ImageItem の詳細については、この記事を確認してください。

于 2011-06-14T10:49:47.737 に答える