Curl Global Community
MenuBar Styling - Printable Version

+- Curl Global Community (https://communities.curl.com)
+-- Forum: Discussions (https://communities.curl.com/forumdisplay.php?fid=1)
+--- Forum: General Curl questions (https://communities.curl.com/forumdisplay.php?fid=2)
+--- Thread: MenuBar Styling (/showthread.php?tid=580)



MenuBar Styling - happycoin - 07-27-2012


"MenuBar"、"MenuBar/ item-box"、"MenuBar/ divider-box" and"MenuBar/ divider"のSkiningサンプルコードを入手することができますか?

IDE HelpだけではMenuBarやSubMenuなどSkining作業がうまくできないですね

アドバイスお願いします。


RE: MenuBar Styling - ashimo - 07-30-2012

サンプルコードではないですが
MenuBarとSubMenuへのスキン適用はこんな感じでできました
Code:
{curl 8.0 applet}
{value
    {def menu-skin = {ShadedSkinSpec "khaki", "gold",
                         border-color = "tan",
                         rollover-border-color = "crimson",
                         margin-spec = {OffsetSpec 3pt, 3pt},
                         corner-radius = 8px
                     }
    }
    {let menu-bar:MenuBar = {MenuBar
                                skin = menu-skin,
                                {SubMenu label = "File",
                                    skin = menu-skin,
                                    {SubMenu label = "New",
                                        skin = menu-skin,
                                        {MenuAction label = "Curl"},
                                        {MenuAction label = "Text"},
                                        {MenuAction label = "Close"}
                                    }
                                },
                                {SubMenu label = "Edit",
                                    skin = menu-skin,
                                    {MenuAction label = "Cut"},
                                    {MenuAction label = "Paste"}
                                }
                            }
    }
    menu-bar
}



RE: MenuBar Styling - happycoin - 07-31-2012

(07-30-2012, 04:21 PM)ashimo Wrote: 良い情報ありがとうございます。
(07-30-2012, 04:21 PM)ashimo Wrote: サンプルコードではないですが
MenuBarとSubMenuへのスキン適用はこんな感じでできました
Code:
{curl 8.0 applet}
{value
    {def menu-skin = {ShadedSkinSpec "khaki", "gold",
                         border-color = "tan",
                         rollover-border-color = "crimson",
                         margin-spec = {OffsetSpec 3pt, 3pt},
                         corner-radius = 8px
                     }
    }
    {let menu-bar:MenuBar = {MenuBar
                                skin = menu-skin,
                                {SubMenu label = "File",
                                    skin = menu-skin,
                                    {SubMenu label = "New",
                                        skin = menu-skin,
                                        {MenuAction label = "Curl"},
                                        {MenuAction label = "Text"},
                                        {MenuAction label = "Close"}
                                    }
                                },
                                {SubMenu label = "Edit",
                                    skin = menu-skin,
                                    {MenuAction label = "Cut"},
                                    {MenuAction label = "Paste"}
                                }
                            }
    }
    menu-bar
}