ActiveX
Contents
[
Hide
]
Bu makale, Aspose.Slides for Android via Java kullanarak bir sunumda ActiveX denetimlerini ekleme, erişme, kaldırma ve yapılandırma yöntemlerini gösterir.
ActiveX Denetimi Ekle
Yeni bir ActiveX denetimi ekleyin ve isteğe bağlı olarak özelliklerini ayarlayın.
static void addActiveX() {
Presentation presentation = new Presentation();
try {
ISlide slide = presentation.getSlides().get_Item(0);
// Yeni bir ActiveX denetimi ekleyin.
IControl control = slide.getControls().addControl(ControlType.WindowsMediaPlayer, 50, 50, 100, 50);
// İsteğe bağlı olarak bazı özellikleri ayarlayın.
control.getProperties().add("Value", "Default text");
presentation.save("add_activex.pptm", SaveFormat.Pptm);
} finally {
presentation.dispose();
}
}
ActiveX Denetimine Eriş
Slayttaki ilk ActiveX denetiminden bilgi okuyun.
static void accessActiveX() {
Presentation presentation = new Presentation("add_activex.pptm");
try {
ISlide slide = presentation.getSlides().get_Item(0);
if (slide.getControls().size() > 0) {
// İlk ActiveX denetimine eriş.
IControl control = slide.getControls().get_Item(0);
System.out.println("Control Name: " + control.getName());
System.out.println("Value: " + control.getProperties().get_Item("Value"));
}
} finally {
presentation.dispose();
}
}
ActiveX Denetimini Kaldır
Slayttan mevcut bir ActiveX denetimini silin.
public static void removeActiveX() {
Presentation presentation = new Presentation("add_activex.pptm");
try {
ISlide slide = presentation.getSlides().get_Item(0);
if (slide.getControls().size() > 0) {
// İlk ActiveX denetimini kaldır.
slide.getControls().removeAt(0);
}
presentation.save("removed_activex.pptm", SaveFormat.Pptm);
} finally {
presentation.dispose();
}
}
ActiveX Özelliklerini Ayarla
Bir denetim ekleyin ve çeşitli ActiveX özelliklerini yapılandırın.
public static void setActiveXProperties() {
Presentation presentation = new Presentation();
try {
ISlide slide = presentation.getSlides().get_Item(0);
// Bir Windows Media Player denetimi ekleyin ve özellikleri yapılandırın.
IControl control = slide.getControls().addControl(ControlType.WindowsMediaPlayer, 50, 50, 150, 50);
control.getProperties().set_Item("Caption", "Click Me");
control.getProperties().set_Item("Enabled", "true");
presentation.save("set_activex_props.pptm", SaveFormat.Pptm);
} finally {
presentation.dispose();
}
}