PDA

View Full Version : Close parent windows from loading url



muhammadantoniussony
Jun 06, 2020, 4:13 PM
Greeting,

Number 1 :

I've load url to a create window on desktop using this code :


[DirectMethod(ShowMask = true)]
public void createwinappme(string idmn, string wtitle, string waction, int wheight, int wwidth)
{
Desktop.GetInstance().CreateWindow(new Window
{
ID = idmn,
Height = wheight,
Width = wwidth,
Maximizable = false,
Resizable = false,
Title = wtitle,
Icon = Icon.TableGear,
CloseAction = CloseAction.Destroy,
Modal = false,
Layout = "FitLayout",
Loader = new ComponentLoader
{
Url= waction,
Mode = LoadMode.Frame,
LoadMask =
{
ShowMask = true
}
}

});
}


idmn --> the created windows ID
waction ---> loading url

on the waction i've put button to close the windows parent



<ext:Button ID="btnClose" runat="server" AutoPostBack="false" Text="Exit" Icon="DoorOpen">
<Listeners>
<Click Handler=" " />
</Listeners>
</ext:Button>


Is there any solution to close parent windows using button on loading url ...???

Number 2 :

I've try to hide desktop start button using this code :


<Listeners>
<Ready Handler="Ext.get('ux-taskbar-start').addClass('x-hide-display');" />
</Listeners>


but i've got my desktop blank like below

25360

Is there any solution to hide start button ... ??

Thank you ...

geoffrey.mcgill
Jun 11, 2020, 5:40 PM
Hi. For your first question, can you create simplified sample that demonstrates how we can reproduce the scenario locally?

Tips for creating simplified code samples:
https://forums.ext.net/showthread.php?61176-Tips-for-creating-simplified-code-samples

Please start a new forum thread for your second unrelated question.

muhammadantoniussony
Jun 12, 2020, 12:13 AM
Hello, Geoffrey ...
Thank you ...

For Number 1 question , I've already search on forum and below the function to close


var closeWKIBA = function () {
if (App.e_kdsensus.getValue() == '1')
window.parent.App.mnsKIBA.close(); /*this make window parent close*/
else
window.parent.App.mnKIBA.close(); /*this make window parent close*/
};


and for the 'closeButton'



<ext:Button ID="btnClose" runat="server" Text="Exit" Icon="DoorOpen" >
<Listeners>
<Click Handler="closeWKIBA();" />
</Listeners>
</ext:Button>


with mnsKIBA and mnKIBA as a parent window

You can close number 1 question

and for the number 2 question I'll create new thread

Thank you ....