Hi my previous projects where based on IW Bootstrap 3. I have modal dialogs working there. This was with the help of the bootstrap demo.
For a new project I would like to use IW Bootstrap 4. Reason is an external party created a bootstrap 4 template I should use.
But I didn't succeed in creating an example using IWBS4. TIWBS4Modal is for example not registered in the IDE. Why? Should I use TIWBS4MoabDialog?
Does somebody have a working example?
I saw the other post about iwbs4 modal dialogs but here the example doesn't seem complete.
Are people active using the IWBS4 components in a project?
(10-12-2021, 08:35 PM)jeroen.rottink Wrote: [ -> ]Hi my previous projects where based on IW Bootstrap 3. I have modal dialogs working there. This was with the help of the bootstrap demo.
For a new project I would like to use IW Bootstrap 4. Reason is an external party created a bootstrap 4 template I should use.
But I didn't succeed in creating an example using IWBS4. TIWBS4Modal is for example not registered in the IDE. Why? Should I use TIWBS4MoabDialog?
Does somebody have a working example?
I saw the other post about iwbs4 modal dialogs but here the example doesn't seem complete.
Are people active using the IWBS4 components in a project?
Hi!
I manage to made a functional modal in bootstrap 4 with TIWBS4Moab and I posted my example in this forum. If it doesn't work for you, what kind of an error are you getting?
Otherwise using bootstrap 4 with Intraweb is for me really like a nightmare because I'm getting a lot of issues and it's really hard to figure them out and as you said - there aren't any demos.
Kind regards,
Bostjan
I now have it working. I'll create an example this weekend (It's too late now) and post it here.
The basics:
- TIWServerController.RenderAsyncEnabled := False;
- Make sure the application has access to iwbs.js (include it in your template or otherways)
Code:
TFrame
TIWBS4Moab
TIWBSMoab4Dialog
TIWBSMoabContent
TIWBS4 regions like modal-header, modal-body and modal-footer and controls
// create example
procedure TDlgMain.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
var Dialog: TFrameModalTest;
begin
Dialog := TFrameModalTest.Create(Self);
Dialog.Parent := Self;
end;
// close button in dialog
procedure TFrameModalTest.btnCloseAsyncClick(Sender: TObject; EventParams: TStringList);
begin
IWFrameRegion.ModalVisible := False;
// when IWFrameRegion.DestroyOnHide = True, the parent TFrame will be freed as well
end;