英文:
Oracle Apex Color DefaultAdd Row IG Button
问题
有没有办法为交互式网格中的“添加行/编辑”按钮着色?
基本上,就像我们可以对页面按钮做的那样,将其更改为热按钮。
英文:
Is there a way to colour the Add Row/Edit buttons which are part of the Interactive Grid?
Basically change it to Hot button, what we can do with the page buttons.
答案1
得分: 1
以下是翻译好的内容:
在您的 IG 区域 > 属性 > 初始化 JavaScript 函数中,可以添加用于 IG 的配置 JavaScript。在网上有很多关于这方面的示例,这里是一个示例:
function (config)
{
    var $ = apex.jQuery,
        toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
    saveAction = toolbarData.toolbarFind("save");
    // 仅图标,没有标签
    // saveAction.iconOnly = true;
    // 图标位置
    saveAction.iconBeforeLabel = true;
    // 使用 Apex 图标字体,前缀为 "fa"
    saveAction.icon = "icon-ig-save";
    // 自定义标签
    saveAction.label = "保存";
    // 热键
    saveAction.hot = false;
    config.toolbarData = toolbarData;
  return config;
}
官方文档 对这个主题也有很好的说明。
英文:
In your IG region > Attributes > Initialization Javascript Function it's possible to add config javascript for the IG. There are plenty of examples on the web of this, here is one example.
function (config)
{
    var $ = apex.jQuery,
        toolbarData = $.apex.interactiveGrid.copyDefaultToolbar();
    saveAction    = toolbarData.toolbarFind("save");
    // only icon, no label
    // saveAction.iconOnly = true;
    // icon location
    saveAction.iconBeforeLabel = true;
    // to use font apex icons, prefix with "fa"
    saveAction.icon ="icon-ig-save";
    // custom label
    saveAction.label = "Save it baby !";
    // hot or not
    saveAction.hot = false;
    config.toolbarData = toolbarData;
  return config;
}
Official docs are also pretty good on this subject
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论