Curl Global Community

Full Version: TextField の見た目を変更したい
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
TextField は白い背景とラウンドした枠を持っていると思います。
これをすべて透明にすることはできますか?

方法があれば教えて下さい。
こんな感じかな。

Code:
{curl 8.0 applet}

{define-class public MyStandardTextFieldUI {inherits StandardTextFieldUI}

  {method protected {overdraw-control renderer2d:Renderer2d}:void
    ||hoge
  }

}


{VBox
    width = 300pt,
    height = 200pt,
    background = "aliceblue",
    {TextField
        width = 200pt
    },
    {TextField
        control-content-background = "transparent",
        value = "hello",
        width = 200pt,
        ui-object = {MyStandardTextFieldUI}
    }
}
コントロールの描画を担当する draw メソッドからたどっていけば見つけられたのですね。
ありがとうございます。
らりるれろ。