Schalter arbeit in der Schalterleiste korrekt, im Menü jedoch nicht.

Hilfe zu verschiedenen Themen
Antworten
Benutzeravatar
josinoro
Supporter
Beiträge: 327
Registriert: 10. Nov 2021 20:56

Schalter arbeit in der Schalterleiste korrekt, im Menü jedoch nicht.

Beitrag von josinoro »

In einem Drei-Tasten-Schalter gebe ich über Dynamische Symbol/Beschriftung von untergeordneten Tasten den Labeltext nach oben weiter.
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==&quot;LargeIcons&quot; ? &quot;Große Symbole&quot; : viewmode==&quot;SmallIcons&quot; ? &quot;Kleine Symbole&quot; : viewmode==&quot;List&quot; ? &quot;Liste&quot; : viewmode==&quot;Details&quot; ? &quot;Details&quot; : viewmode==&quot;Power&quot; ? &quot;Powermodus&quot; :  viewmode==&quot;Thumbnails&quot; ? &quot;Miniaturansicht&quot; :  viewmode==&quot;Tiles&quot; ? &quot;Kacheln&quot; :  &quot;Dateiansicht&quot;</instruction>
			<instruction />
			<instruction>//@if Set VIEW=&quot;LargeIcons&quot;</instruction>
			<instruction>//@label:= &quot;LargeIcons&quot;</instruction>
			<instruction />
			<instruction>//@if Set view=&quot;Details&quot;</instruction>
			<instruction>//@label:= &quot;Details+&quot;</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ü &lt;%ddbi:94&gt; Dateiansicht</tip>
		<icon1>#newbuttonmenu</icon1>
		<button backcol="none" display="label" field_type="label" size="full" textcol="none">
			<label>&lt;#ffffff&gt;         Dateiansicht\t&lt;%ddbi:091&gt;&lt;/#&gt;</label>
			<icon1>#label</icon1>
			<function type="normal">
				<instruction>Set LABEL</instruction>
			</function>
		</button>
		<button display="both" hotkey="ctrl+shift+G" hotkey_label="yes">
			<label>&amp;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>&amp;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>&amp;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>&amp;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>&amp;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>&amp;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&amp;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&amp;COLUMNSTOGGLE=thumbnail</instruction>
			</function>
		</button>
		<button backcol="none" display="both" label_pos="right" textcol="none">
			<label>K&amp;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&lt;kbd&gt;an&lt;/kbd&gt; / &lt;kbd&gt;aus&lt;/kbd&gt;</label>
			<tip>Schaltet die Symbole vor dem Dateinamen &lt;#f9f900&gt;an / aus&lt;/#&gt;</tip>
			<icon1>#detailsmode</icon1>
			<icon2>#thumbnailimagefolder</icon2>
			<function type="normal">
				<instruction>// Symbole vor dem Dateinamen anzeigen</instruction>
				<instruction>@disableifpath:shell</instruction>
				<instruction>@toggle:if&amp;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>&lt;%mousel&gt;&lt;%arrow&gt;&lt;/#&gt; Wechselt zwischen der zuletzt gewählten FlatView Ansicht und der normalen Ansicht.\n&lt;%mouserl&gt;&lt;%arrow&gt;&lt;/#&gt; Menü ...</tip>
			<icon1>#JEG_Icons_(32px_&amp;_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(&quot;$glob:_FlatViewStatus&quot;) == &quot;&quot; ? &quot;on&quot; : Val(&quot;$glob:_FlatViewStatus&quot;)=}</instruction>
				<instruction />
				<instruction>@if:common</instruction>
				<instruction>@label:=Val(&quot;$glob:_FlatViewStatus&quot;)</instruction>
			</function>
			<button backcol="none" display="label" field_type="label" size="full" textcol="none">
				<label>         Flat View\t&lt;%ddbi:091&gt;</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	&lt;%arrow&gt;</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)	&lt;%arrow&gt;</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	&lt;%arrow&gt;</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_&amp;_24px):FileExplorer</icon1>
				<function type="normal">
					<instruction>Set FLATVIEW=Off</instruction>
					<instruction>@set glob!:_FlatViewStatus=Status: Aus	&lt;%arrow&gt;</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>

Antworten