Notice

The forum is in read only mode.

  • Page:
  • 1
  • 2

TOPIC: TWebBrowser overlapping between other controls

TWebBrowser overlapping between other controls 7 years 3 months ago #1779

I'm using Appmethod 1.16 (latest version nowadays), think it is like XE8.

TWebBrowser overlapping between other controls 7 years 3 months ago #1780

Hi,

I am glad you liked the tutorial. Regarding Problem 2, I would recommend having a look at this post: blogs.embarcadero.com/sarinadupont/2013/...-and-data-on-mobile/

Regards,
Sarina

TWebBrowser overlapping between other controls 7 years 3 months ago #1782

wow, beautiful and intelligent, why don't you live next door! :P

I'll look your link as soon as I finish some test about problem 1. BTW I found a trick: community.embarcadero.com/index.php/answ...rowser-always-on-top

If you guys find another solution would be great!

TWebBrowser overlapping between other controls 7 years 3 months ago #1813

Sarina wrote: Hi,

I am glad you liked the tutorial. Regarding Problem 2, I would recommend having a look at this post: blogs.embarcadero.com/sarinadupont/2013/...-and-data-on-mobile/

Regards,
Sarina

Hi, I have no luck reproducing it in c++ (Appmethod) seems like SupportsPlatformService not recognizing Fmx::Medialibrary::IFMXShareSheetActionsService... I did try with this also:
_di_IInterface ShareSheetService;
ShareSheetService = TPlatformServices::Current->GetPlatformService(__uuidof(Fmx::Medialibrary::IFMXShareSheetActionsService));
And the App shows a message "Item not found."

Also, this didn't work:
_di_IFMXShareSheetActionsService svc;
if (TPlatformServices::Current->SupportsPlatformService(__uuidof(IFMXShareSheetActionsService),	(void*)&svc)) {
svc->Share(lstItemCompartir,"www.portalconsulting.net",0);
}
Is that an issue or just bad code?
TIA.

TWebBrowser overlapping between other controls 7 years 3 months ago #1816

Hi Francisco,

Regarding Problem 2, try this:
1. Set up an action for sharing the image and assign it to your TButton (or TSpeedButton). To do this, place TActionList onto your form, and then select TButton>Action>New Standard Action>Media Library>TShowShareSheetAction in the Object Inspector. Then set up this OnBeforeExecute event (you can access it from the Events tab by expanding the Actions menu):

void __fastcall TfrmShareSheet::ShowShareSheetAction1BeforeExecute(TObject *Sender)
{
// show the share sheet
ShowShareSheetAction1->Bitmap->Assign(imgCameraPicture->Bitmap);
}

2. Set up an on-click event that executes the ShareSheet action that you previously defined, such as:

void __fastcall TfrmShareSheet::Button1Click(TObject *Sender)
{
imgCameraPicture->ExecuteAction(ShowShareSheetAction1);
}


Regards,
Sarina
The following user(s) said Thank You: Francisco

TWebBrowser overlapping between other controls 7 years 3 months ago #1818

Hi Francisco,

The TCustomWebBrowser component has a function called CaptureBitmap which returns a static image of what is currently shown in the web browser component. You can place a TImage component in the same place (with the same alignment) as the web browser. This will help address your z-order issues on Android.

Example Application:

TToolbar with a parented TLabel and TSpeedButton; Toolbar is aligned to the top
TWebBrowser is aligned to the client
TImage is aligned to the client with no image assigned
TListBox with several items in it (i.e to create an overflow menu), set to Visible = False by default;

Set up an on-click event for the toolbar button.

Object Pascal:

procedure TForm28.SpeedButton1Click(Sender: TObject);
begin
Image1.Bitmap := WebBrowser1.CaptureBitmap;
Image1.Visible := True;
WebBrowser1.Visible := False;
ListBox1.Visible := True;
end;


C++:

void __fastcall TForm29::SpeedButton1Click(TObject *Sender)
{
Image1->Bitmap = WebBrowser1->CaptureBitmap();
Image1->Visible = True;
WebBrowser1->Visible = False;
ListBox1->Visible = True;
}


Instead of using an overflow menu (by using TListBox), you could also use the TMultiView component.

Regards,
Sarina
The following user(s) said Thank You: Francisco
  • Page:
  • 1
  • 2
Moderators: April Anne