Der Labeltext soll den ausgewählten Ansichtsmodus wiedergeben.
Direkt auf einer Schalterleiste funktioniert der Schalter. Füge ich den aber in ein Menü, funktioniert die Labelzuweisung nicht.
Schaltercode
Code: Alles auswählen
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none" type="three_button" use_child_icons="yes">
<label>Dateiansicht</label>
<icon1>#newbuttonmenu</icon1>
<button always_enable="yes" backcol="none" display="both" textcol="none">
<label>Dateiansicht</label>
<icon1>#newbuttonmenu</icon1>
<function type="normal">
<instruction>@label=viewmode=="LargeIcons" ? "Große Symbole" : viewmode=="SmallIcons" ? "Kleine Symbole" : viewmode=="List" ? "Liste" : viewmode=="Details" ? "Details" : viewmode=="Power" ? "Powermodus" : viewmode=="Thumbnails" ? "Miniaturansicht" : viewmode=="Tiles" ? "Kacheln" : "Dateiansicht"</instruction>
<instruction />
<instruction>//@if Set VIEW="LargeIcons"</instruction>
<instruction>//@label:= "LargeIcons"</instruction>
<instruction />
<instruction>//@if Set view="Details"</instruction>
<instruction>//@label:= "Details+"</instruction>
<instruction />
<instruction>//Set view=Cycle</instruction>
</function>
</button>
<button always_enable="yes" backcol="none" display="both" textcol="none" type="menu">
<label>Menü Dateiansicht</label>
<tip>Menü <%ddbi:94> Dateiansicht</tip>
<icon1>#newbuttonmenu</icon1>
<button backcol="none" display="label" field_type="label" size="full" textcol="none">
<label><#ffffff> Dateiansicht\t<%ddbi:091></#></label>
<icon1>#label</icon1>
<function type="normal">
<instruction>Set LABEL</instruction>
</function>
</button>
<button display="both" hotkey="ctrl+shift+G" hotkey_label="yes">
<label>&Große Symbole</label>
<tip>Zeigt Objekte mittels großer Symbole an</tip>
<icon1>#default:largeicons</icon1>
<function type="normal">
<instruction>Set VIEW=LargeIcons</instruction>
</function>
</button>
<button display="both" hotkey="ctrl+shift+K" hotkey_label="yes">
<label>&Kleine Symbole</label>
<tip>Zeigt Objekte mittels kleiner Symbole an</tip>
<icon1>#default:smallicons</icon1>
<function type="normal">
<instruction>Set VIEW=SmallIcons</instruction>
</function>
</button>
<button display="both" hotkey="ctrl+shift+L" hotkey_label="yes">
<label>&Liste</label>
<tip>Zeigt Objekte in einer Liste an</tip>
<icon1>#default:listmode</icon1>
<function type="normal">
<instruction>Set VIEW=List</instruction>
</function>
</button>
<button display="both" hotkey="ctrl+shift+D" hotkey_label="yes">
<label>&Details</label>
<tip>Zeigt die Details jedes Objektes an</tip>
<icon1>#default:detailsmode</icon1>
<function type="normal">
<instruction>Set VIEW=Details</instruction>
</function>
</button>
<button display="both" hotkey_label="yes">
<label>&Powermodus</label>
<tip>Zeigt die Details jedes Objektes an (mit mehr Anpassungsoptionen als im Detailmodus)</tip>
<hotkeys>
<key disable="yes">ctrl+shift+P</key>
</hotkeys>
<icon1>#default:powermode</icon1>
<function type="normal">
<instruction>Set VIEW=Power</instruction>
</function>
</button>
<button backcol="none" display="label" field_type="thumbnailsize" size="full" textcol="none">
<label>Miniaturansicht Größe</label>
<tip>Verändert die Größe der Symbole in der Miniaturansicht</tip>
<icon1>#label</icon1>
<function type="normal">
<instruction>Show THUMBNAILSIZE=field</instruction>
</function>
</button>
<button display="both" hotkey="ctrl+shift+M" hotkey_label="yes">
<label>&Miniaturansicht</label>
<tip>Zeigt Miniaturansichten von Bilddateien an</tip>
<icon1>#default:thumbnails</icon1>
<function type="normal">
<instruction>Set VIEW=Thumbnails</instruction>
</function>
</button>
<button backcol="none" display="both" hotkey="188,3" hotkey_label="yes" label_pos="right" textcol="none">
<label>D&etails + Miniaturen</label>
<tip>Zeigt Details jedes Objektes und zusätzlich eine Spalte mit Miniaturen</tip>
<icon1>#thumbtails</icon1>
<function type="normal">
<instruction>Set VIEW=Details</instruction>
<instruction>Set COLUMNSADD=thumbnail(0,96)</instruction>
<instruction>@toggle:if&COLUMNSTOGGLE=thumbnail</instruction>
</function>
</button>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>K&acheln</label>
<tip>Zeigt Dateien in Kacheln mit konfigurierbarer Information</tip>
<icon1>#tile</icon1>
<function type="normal">
<instruction>Set VIEW=Tiles</instruction>
</function>
</button>
<button backcol="none" display="both" textcol="none">
<label>Symbole\t<kbd>an</kbd> / <kbd>aus</kbd></label>
<tip>Schaltet die Symbole vor dem Dateinamen <#f9f900>an / aus</#></tip>
<icon1>#detailsmode</icon1>
<icon2>#thumbnailimagefolder</icon2>
<function type="normal">
<instruction>// Symbole vor dem Dateinamen anzeigen</instruction>
<instruction>@disableifpath:shell</instruction>
<instruction>@toggle:if&COLUMNSTOGGLE=thumbnail</instruction>
<instruction>//Set COLUMNSADD=thumbnail(0,{dpi|96})</instruction>
<instruction>Set COLUMNSTOGGLE=thumbnail(0,{dpi|64})</instruction>
</function>
</button>
<button backcol="none" display="both" no_label="yes" separate="yes" textcol="none" timed="yes" type="menu_button">
<label>FlatView</label>
<tip><%mousel><%arrow></#> Wechselt zwischen der zuletzt gewählten FlatView Ansicht und der normalen Ansicht.\n<%mouserl><%arrow></#> Menü ...</tip>
<icon1>#JEG_Icons_(32px_&_24px):FileExplorer</icon1>
<function type="normal">
<instruction>@toggle:if Set FLATVIEW=Toggle</instruction>
<instruction>@icon:Flat view mixed,Set FLATVIEW=Mixed</instruction>
<instruction>@icon:Flat view mixed (no folders),Set FLATVIEW=MixedNoFolders</instruction>
<instruction>@icon:Flat view grouped,Set FLATVIEW=Grouped</instruction>
<instruction>@icon:FileExplorer,Set FLATVIEW=Off</instruction>
<instruction />
<instruction>@if:Set FLATVIEW=On</instruction>
<instruction>Set FLATVIEW=Off</instruction>
<instruction />
<instruction>@if:else</instruction>
<instruction>Set FLATVIEW={=Val("$glob:_FlatViewStatus") == "" ? "on" : Val("$glob:_FlatViewStatus")=}</instruction>
<instruction />
<instruction>@if:common</instruction>
<instruction>@label:=Val("$glob:_FlatViewStatus")</instruction>
</function>
<button backcol="none" display="label" field_type="label" size="full" textcol="none">
<label> Flat View\t<%ddbi:091></label>
<icon1>#label</icon1>
<function type="normal">
<instruction>Set LABEL</instruction>
</function>
</button>
<button backcol="none" display="both" hotkey_label="yes" label_pos="right" textcol="none">
<label>Gemischt</label>
<tip>Zeigt den Inhalt einschliesslich aller Unterordner in der aktuellen Dateiansicht</tip>
<hotkeys>
<chord>
<key disable="yes">shift+F</key>
<key>shift+1</key>
</chord>
</hotkeys>
<icon1>#Flat view mixed</icon1>
<function type="normal">
<instruction>Set FLATVIEW=On,Mixed</instruction>
<instruction>@set glob!:_FlatViewStatus=Status: Gemischt <%arrow></instruction>
</function>
</button>
<button backcol="none" display="both" hotkey_label="yes" label_pos="right" textcol="none">
<label>Gemischt (keine Ordner)</label>
<tip>Zeigt den Inhalt einschliesslich aller Unterordner in der aktuellen Dateiansicht (verbirgt aber die Ordner selbst)</tip>
<hotkeys>
<chord>
<key disable="yes">shift+F</key>
<key>shift+2</key>
</chord>
</hotkeys>
<icon1>#Flat view mixed (no folders)</icon1>
<function type="normal">
<instruction>Set FLATVIEW=On,MixedNoFolders</instruction>
<instruction>@set glob!:_FlatViewStatus=Status: Gemischt (keine Ordner) <%arrow></instruction>
</function>
</button>
<button backcol="none" display="both" hotkey_label="yes" label_pos="right" separate="yes" textcol="none">
<label>Gruppiert</label>
<tip>Zeigt den Inhalt einschliesslich aller Unterordner in der aktuellen Dateiansicht (gruppiert nach Orten)</tip>
<hotkeys>
<chord>
<key disable="yes">shift+F</key>
<key>shift+3</key>
</chord>
</hotkeys>
<icon1>#Flat view grouped</icon1>
<function type="normal">
<instruction>Set FLATVIEW=On,Grouped</instruction>
<instruction>@set glob!:_FlatViewStatus=Status: Gruppiert <%arrow></instruction>
</function>
</button>
<button backcol="none" display="both" hotkey_label="yes" label_pos="right" textcol="none">
<label>Aus</label>
<tip>Schaltet die FlatView ab und zeigt wieder die normale Ordneransicht</tip>
<hotkeys>
<chord>
<key disable="yes">shift+F</key>
<key>shift+0</key>
</chord>
</hotkeys>
<icon1>#JEG_Icons_(32px_&_24px):FileExplorer</icon1>
<function type="normal">
<instruction>Set FLATVIEW=Off</instruction>
<instruction>@set glob!:_FlatViewStatus=Status: Aus <%arrow></instruction>
</function>
</button>
</button>
<button backcol="none" display="both" hotkey_label="yes" label_pos="right" textcol="none">
<label>Dateiansicht wechseln</label>
<tip>Dateiansicht wechseln</tip>
<icon1>#reload_page</icon1>
<function type="normal">
<instruction>Set view=Cycle</instruction>
</function>
</button>
</button>
</button>