Option to automatically set object tag to object name or possibly event name as well in designer.
I pretty much set the tags to the object names, this option would save me quite a bit of time building and maintaining my more complex designer forms.
Thanks
@Erel
A menu entry in the designer tools menu like names to tags would be nice, so all selected views would have there tags matching their names. Useful when you need to load the layout (sub-layout in many cases) in another utility module and then bind the loaded views. Here is a suggestion:
Designer Menu Entry: Tools → Set Tags from Names (or similar)
- Applies to selected views or all views in the current layout
- Automatically assigns each view's Tag property to match its Name property
- Works across all B4X platforms (B4A, B4i, B4J)
Current (Manual):
For each view in designer:
1. Select view
2. Go to Properties panel
3. Set Tag = Name manually
4. Repeat for 20+ views...
Proposed (Automated):
1. Select multiple views (or Select All)
2. Tools → Set Tags from Names
3. Done! All selected views now have Tag = Name
Implementation Suggestions
- Menu Location: Tools menu in Visual Designer
- Shortcut: Maybe Ctrl+Shift+T
- Options:
- "Set tags for selected views only" (default)
- "Set tags for all views in layout"
- "Overwrite existing tags" checkbox
- Preview dialog showing "Name → Tag" mappings before applying
Alternative/Additional Features
- Event Name Option: Could also set tags to match event sub names (e.g., Button1_Click → tag: Button1)
- Reverse Operation: Set Names from Tags for the opposite direction
- Bulk Tag Operations: Pattern-based tag setting (prefix, suffix, etc.)
Benefits
- Time Saving: Eliminates repetitive manual tag assignment
- Error Reduction: No typos in tag names
- Consistency: Ensures tags always match names
- Modularity: Better support for sub-layout loading patterns
- Tool Integration: Enables better external tool support (like BalConverter workflows)
Based on forum discussions, many developers manually set tags to match names for various binding scenarios. This feature would benefit the entire B4X community working with complex, modular applications.