ui.Panel.Layout.flow
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह एक ऐसा लेआउट दिखाता है जिसमें विजेट को हॉरिज़ॉन्टल या वर्टिकल फ़्लो में रखा जाता है.
डिफ़ॉल्ट रूप से, विजेट फ़्लो लेआउट पैनल में अपनी तय की गई जगह लेते हैं. जोड़े गए किसी विजेट पर "stretch" स्टाइल प्रॉपर्टी सेट करें, ताकि उसे ज़रूरत के हिसाब से उपलब्ध जगह में फैलाया जा सके:
- हॉरिज़ॉन्टल, वर्टिकल, दोनों
एक से ज़्यादा विजेट को स्ट्रेच करने पर, उपलब्ध जगह को उनके बीच बराबर बांट दिया जाता है. पैनल, विजेट ही होते हैं. इन्हें "stretch" स्टाइल प्रॉपर्टी तय करके बड़ा किया जा सकता है.
इस्तेमाल | रिटर्न |
---|
ui.Panel.Layout.flow(direction, wrap) | ui.Panel.Layout |
आर्ग्यूमेंट | टाइप | विवरण |
---|
direction | स्ट्रिंग, ज़रूरी नहीं | फ़्लो की दिशा. 'हॉरिजॉन्टल' या 'वर्टिकल' में से कोई एक. डिफ़ॉल्ट रूप से, इसकी वैल्यू 'vertical' होती है. |
wrap | बूलियन, ज़रूरी नहीं | अगर एक लाइन में दिखाने के लिए बहुत ज़्यादा आइटम हैं, तो क्या लेआउट में बच्चों को रैप करना है. डिफ़ॉल्ट रूप से, यह 'गलत' पर सेट होती है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eui.Panel.Layout.flow()\u003c/code\u003e function arranges widgets within a panel in either a horizontal or vertical flow.\u003c/p\u003e\n"],["\u003cp\u003eWidgets naturally occupy their required space but can be stretched to fill available space using the "stretch" style property.\u003c/p\u003e\n"],["\u003cp\u003eWhen multiple widgets have the "stretch" property, the available space is divided equally among them, including panels which are also widgets.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eflow\u003c/code\u003e layout can be customized using the \u003ccode\u003edirection\u003c/code\u003e argument for flow orientation (horizontal or vertical) and the \u003ccode\u003ewrap\u003c/code\u003e argument to control wrapping of overflowing widgets.\u003c/p\u003e\n"]]],[],null,["# ui.Panel.Layout.flow\n\n\u003cbr /\u003e\n\nReturns a layout that places its widgets in a flow, either horizontal or vertical.\n\n\u003cbr /\u003e\n\nBy default, widgets take up their natural space within a flow layout panel. Set the \"stretch\" style property on an added widget to stretch it to fill available space in the relevant direction:\n\n- horizontal, vertical, both\n\nWhen multiple widgets are stretched, the available space is split equally among them. Panels are widgets themselves and can be stretched by specifying a \"stretch\" style property.\n\n| Usage | Returns |\n|--------------------------------------------------|-----------------|\n| `ui.Panel.Layout.flow(`*direction* `, `*wrap*`)` | ui.Panel.Layout |\n\n| Argument | Type | Details |\n|-------------|-------------------|------------------------------------------------------------------------------------------------------|\n| `direction` | String, optional | The direction of the flow. One of 'horizontal' or 'vertical'. Defaults to 'vertical'. |\n| `wrap` | Boolean, optional | Whether to wrap children in the layout if there are too many to show in one line. Defaults to false. |"]]