Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eBorder\u003c/code\u003e describes the border around an element and provides methods to manipulate its appearance.\u003c/p\u003e\n"],["\u003cp\u003eYou can get and set the border's dash style, line fill, thickness, and visibility using dedicated methods.\u003c/p\u003e\n"],["\u003cp\u003eSetting a dash style or weight on a transparent border makes it visible.\u003c/p\u003e\n"],["\u003cp\u003eAll methods require authorization with specific scopes for accessing and modifying presentations.\u003c/p\u003e\n"]]],["The document outlines how to interact with an element's border. Key actions include getting the border's `DashStyle`, `LineFill`, weight (thickness), and visibility status. You can set the border's `DashStyle`, make it transparent, or adjust its weight in points. Setting a dash style or weight on a transparent border makes it visible. Each method requires specific authorization scopes. The get weight method returns null if the element does not have a border.\n"],null,["Border\n\nDescribes the border around an element. \n\nMethods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------|\n| [getDashStyle()](#getDashStyle()) | [DashStyle](/apps-script/reference/slides/dash-style) | Gets the [DashStyle](/apps-script/reference/slides/dash-style) of the border. |\n| [getLineFill()](#getLineFill()) | [LineFill](/apps-script/reference/slides/line-fill) | Gets the [LineFill](/apps-script/reference/slides/line-fill) of the border. |\n| [getWeight()](#getWeight()) | `Number` | Gets the thickness of the border in points. |\n| [isVisible()](#isVisible()) | `Boolean` | Gets whether the border is visible or not. |\n| [setDashStyle(style)](#setDashStyle(DashStyle)) | [Border](#) | Sets the [DashStyle](/apps-script/reference/slides/dash-style) of the border. |\n| [setTransparent()](#setTransparent()) | [Border](#) | Sets the border to be transparent. |\n| [setWeight(points)](#setWeight(Number)) | [Border](#) | Sets the thickness of the border in points. |\n\nDetailed documentation \n\n`get``Dash``Style()` \nGets the [DashStyle](/apps-script/reference/slides/dash-style) of the border.\n\nReturn\n\n\n[DashStyle](/apps-script/reference/slides/dash-style)\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`get``Line``Fill()` \nGets the [LineFill](/apps-script/reference/slides/line-fill) of the border.\n\nReturn\n\n\n[LineFill](/apps-script/reference/slides/line-fill)\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`get``Weight()` \nGets the thickness of the border in points. Returns `null` if the element does not have a\nborder.\n\nReturn\n\n\n`Number`\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`is``Visible()` \nGets whether the border is visible or not.\n\nReturn\n\n\n`Boolean`\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`set``Dash``Style(style)` \nSets the [DashStyle](/apps-script/reference/slides/dash-style) of the border.\n\nSetting a [DashStyle](/apps-script/reference/slides/dash-style) on a transparent border makes it visible.\n\nParameters\n\n| Name | Type | Description |\n|---------|-------------------------------------------------------|-------------|\n| `style` | [DashStyle](/apps-script/reference/slides/dash-style) | |\n\nReturn\n\n\n[Border](#)\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`set``Transparent()` \nSets the border to be transparent.\n\nReturn\n\n\n[Border](#)\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`\n\n*** ** * ** ***\n\n`set``Weight(points)` \nSets the thickness of the border in points.\n\nSetting a weight on a transparent border makes it visible.\n\nParameters\n\n| Name | Type | Description |\n|----------|----------|-------------|\n| `points` | `Number` | |\n\nReturn\n\n\n[Border](#)\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/presentations.currentonly`\n- `https://www.googleapis.com/auth/presentations`"]]