Pb Webgadget avec la 6.30

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
Bmld76
Messages : 122
Inscription : dim. 09/janv./2022 12:47

Pb Webgadget avec la 6.30

Message par Bmld76 »

Bonjour,

J'est fait un gestionnaire de signature des mails centralisé pour un établissement scolaire. A partir de la 6.30 webgadget n'affiche plus les pages html mais ça fonctionne en 6.21. Je n'ai rien trouvé dans la documentation. J'ai peut-être loupé une info, avez vous une idée ?

Voici un programme test

Code : Tout sélectionner

nom.s = GetHomeDirectory() + "test.html"
    
If OpenWindow(0, 0, 0, 920, 420, "Exemple...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    
   WebGadget(0, 10, 10, 900, 1000, nom,#PB_Web_Edge ) 
   
   Repeat
     Event = WaitWindowEvent()  
   Until Event = #PB_Event_CloseWindow
 EndIf
et un exemple html

Code : Tout sélectionner

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-signature">
      <div class="moz-signature">
        <div class="moz-signature">
          <div class="moz-signature">
            <meta http-equiv="content-type"
              content="text/html; charset=UTF-8">
            <link id="MDHR_textcomplete" rel="stylesheet"
href="moz-extension://10ae395c-8a78-4f20-8565-046814d72e1d/vendor/textcomplete.css">
            <div class="moz-signature">
              <div class="moz-signature">
                <div class="moz-signature">
                  <div class="moz-signature">
                    <div class="moz-signature">
                      <div class="moz-signature">
                        <table style="text-align: left;" cellspacing="3"
                          cellpadding="3" border="0">
                          <tbody>
                            <tr>
                              <td>
                                <p
style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font
                                    face="Calibri"><b
style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">xxxxxxxxxx

                                      XXXXXXXXX</b><br>
                                  </font><font face="Calibri"><span
style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">xxxxxxxxxxxxx</span></font></p>
                                <p
style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font
                                    size="3pt" face="Calibri">xxxxxxxxxxx<br>
                                    xxxxxxxx xxxxxxx <br>
                                    76310 Sainte-Adresse<br>
                                    <br>
                                  </font><font face="Calibri"><span
style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">xx xx xx xx xx</span></font></p>
                              </td>
                              <td style="text-align:center;"></td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <meta http-equiv="content-type"
              content="text/html; charset=UTF-8">
            <title></title>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
Cordialement
_____________________________________________________________
IMAC 21.5 2012 Core I5 - 2.70 Ghz. 16 GB NVIDIA GeForce GT 640M 512 Mo. MacOs OCPL Sequoia 15.7
MacBook Air M1 - 8Go - Macoc Tahoe 26

PureBasic 6.30 MacOS
Avatar de l’utilisateur
falsam
Messages : 7397
Inscription : dim. 22/août/2010 15:24
Localisation : IDF (Yvelines)
Contact :

Re: Pb Webgadget avec la 6.30

Message par falsam »

Regarde le WebViewGadget() avec la version 6.30.
Configuration : Windows 11 Famille 64-bit - PB 6.23 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Bmld76
Messages : 122
Inscription : dim. 09/janv./2022 12:47

Re: Pb Webgadget avec la 6.30

Message par Bmld76 »

Merci, je vais explorer cette piste, mais ce n'est pas normal que webgadget ne fonctionne plus.
_____________________________________________________________
IMAC 21.5 2012 Core I5 - 2.70 Ghz. 16 GB NVIDIA GeForce GT 640M 512 Mo. MacOs OCPL Sequoia 15.7
MacBook Air M1 - 8Go - Macoc Tahoe 26

PureBasic 6.30 MacOS
Bmld76
Messages : 122
Inscription : dim. 09/janv./2022 12:47

Re: Pb Webgadget avec la 6.30

Message par Bmld76 »

Avec WebViewGadget ça s'affiche sur la 6.30. Il faut que je vérifie sur windows car la constante #PB_Web_Edge n'exite pas et était nécessaire. A moins que qqn me le valide sur Windows ... Merci

Cordialement

Code : Tout sélectionner

  OpenWindow(0, 100, 100, 400, 400, "Salut", #PB_Window_SystemMenu)

  WebViewGadget(0, 0, 0, 400, 400)
  
  Debug #PB_Compiler_Home
  nom.s = GetHomeDirectory() + "test.html"
  SetGadgetText(0, "file://" + nom)
  
  Repeat 
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
_____________________________________________________________
IMAC 21.5 2012 Core I5 - 2.70 Ghz. 16 GB NVIDIA GeForce GT 640M 512 Mo. MacOs OCPL Sequoia 15.7
MacBook Air M1 - 8Go - Macoc Tahoe 26

PureBasic 6.30 MacOS
Avatar de l’utilisateur
falsam
Messages : 7397
Inscription : dim. 22/août/2010 15:24
Localisation : IDF (Yvelines)
Contact :

Re: Pb Webgadget avec la 6.30

Message par falsam »

Bmld76 a écrit : lun. 16/févr./2026 9:44 Avec WebViewGadget ça s'affiche sur la 6.30. Il faut que je vérifie sur windows car la constante #PB_Web_Edge n'exite pas et était nécessaire.
Tu ne devrais plus avoir besoin du flag #pb_Web_Edge avec la version 6.30 de PureBasic car le WebViewGadget() est basé sur la plateforme Edge version 144.

➡️ Un code pour vérifier la version du WebViewGadget()

Code : Tout sélectionner

EnableExplicit

Enumeration
  #app
  #webview
EndEnumeration

; Event
Define Event

Declare onResize()

OpenWindow(#app, 0, 0, 800, 600, "HTML5 Test", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
BindEvent(#PB_Event_SizeWindow, @onResize())

; Webview
WebViewGadget(#webview, 0, 0, 800, 600)

; Insert code HTML
SetGadgetText(#webview, "https://html5test.co/")

Repeat 
  Event = WaitWindowEvent()  
Until Event = #PB_Event_CloseWindow

Procedure onResize()
    ResizeGadget(#webview, 0, 0, WindowWidth(#app), WindowHeight(#app))
EndProcedure  
On peut d'ailleurs voir que le WebVieWGadget obtient une très belle note.

- Chrome 582 points sur 588.
- Edge 582 points sur 588 (Avec la version 145).
- WebViewGadget() 577 point sur 588 👍
- Firefox 546 points sur 588.
Configuration : Windows 11 Famille 64-bit - PB 6.23 x64 - AMD Ryzen 7 - 16 GO RAM
Vidéo NVIDIA GeForce GTX 1650 Ti - Résolution 1920x1080 - Mise à l'échelle 125%
Bmld76
Messages : 122
Inscription : dim. 09/janv./2022 12:47

Re: Pb Webgadget avec la 6.30

Message par Bmld76 »

Merci
_____________________________________________________________
IMAC 21.5 2012 Core I5 - 2.70 Ghz. 16 GB NVIDIA GeForce GT 640M 512 Mo. MacOs OCPL Sequoia 15.7
MacBook Air M1 - 8Go - Macoc Tahoe 26

PureBasic 6.30 MacOS
Répondre