I currently try to edit the contents of a cycle-item during runtime of the application.
So I use mui.CreateObject with a fresh new "Object-Tree".
This is to produce the new xml:
Code: Select all
Function p_TeamItemsbyPosition(positiontext)
DebugPrint("p_TeamItemsbyPosition")
Local items$="<item>None</item>\n"
mui.DoMethod("playerlistcleanall", "Sort", 1)
for Local n = 0 to mui.get("playerlistcleanall","Entries")-1
column1$, column2$,column3$ = mui.DoMethod("playerlistcleanall", "GetEntry", n)
If(column2$ = positiontext)
items$ = items$.."<item>\27b"..column2$.." - "..column3$.."\27n</item>\n"
Else
items$ = items$.."<item>"..column2$.." - "..column3$.."</item>\n"
EndIf()
Next
Return(items$)
EndFunction
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><vgroup id="grplayers" frametitle="players" frame="group" background="groupback"><hgroup>
<text id="grplayerst1">1</text>
<cycle id="cyteamlineup1" horizweight="300"><item>None</item>
<item>CB - Bagaric</item>
<item>CB - Ayar</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst2">2</text>
<cycle id="cyteamlineup2" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst3">3</text>
<cycle id="cyteamlineup3" horizweight="300"><item>None</item>
<item>CB - Bagaric</item>
<item>CB - Ayar</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst4">4</text>
<cycle id="cyteamlineup4" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst5">5</text>
<cycle id="cyteamlineup5" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst6">6</text>
<cycle id="cyteamlineup6" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>bDM - Ahmedn</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst7">7</text>
<cycle id="cyteamlineup7" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst8">8</text>
<cycle id="cyteamlineup8" horizweight="300"><item>None</item>
<item>CB - Bagaric</item>
<item>CB - Ayar</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst9">9</text>
<cycle id="cyteamlineup9" horizweight="300"><item>None</item>
<item>CB - Bagaric</item>
<item>CB - Ayar</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst10">10</text>
<cycle id="cyteamlineup10" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst11">11</text>
<cycle id="cyteamlineup11" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>bRA - Ablen</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst12">12</text>
<cycle id="cyteamlineup12" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst13">13</text>
<cycle id="cyteamlineup13" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst14">14</text>
<cycle id="cyteamlineup14" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst15">15</text>
<cycle id="cyteamlineup15" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup><hgroup>
<text id="grplayerst16">16</text>
<cycle id="cyteamlineup16" horizweight="300"><item>None</item>
<item>CB - Ayar</item>
<item>CB - Bagaric</item>
<item>DM - Ahmed</item>
<item>MA - Alexander-Salota</item>
<item>RA - Able</item>
</cycle>
</hgroup> <vgroup>
<text>Strength:</text>
<text id="txteamselectedplayerstrength"/>
<button id="btteamselectedplayerset" notify="pressed" frame="button">\33A[27]Set Players</button>
<button id="btteamtacticview" notify="pressed" frame="button">\33A[42]View Tactics</button>
<rectangle/>
</vgroup>
</vgroup>
How do i have to set the text of an Item to be partially bold?
Code: Select all
items$ = items$.."<item>\27b"..column2$.." - "..column3$.."\27n</item>\n"