Search found 601 matches
- Thu Jun 19, 2025 10:28 am
- Forum: Bugs - Mac OSX
- Topic: Menu destroyed on dialog close
- Replies: 5
- Views: 266
Re: Menu destroyed on dialog close
You're right, but the menu is created before the dialog is ever created. The issue only happens after DisplayPopupMenu is used. What if the menu is used in two places? The dialog destroys it. I do know that we can create the menu each time they are needed, of course.
- Mon Jun 16, 2025 2:20 pm
- Forum: Bugs - Mac OSX
- Topic: Menu destroyed on dialog close
- Replies: 5
- Views: 266
Menu destroyed on dialog close
If a menu is opened on a dialog, it's then destroyed when the dialog is closed. It works okay on Windows and Qt, but UnbindMenuEvent causes a crash on Gtk. I haven't tested if it's the same with just a normal window rather than a dialog.
EnableExplicit
Global event, quit
Declare OpenDialog ...
EnableExplicit
Global event, quit
Declare OpenDialog ...
- Sun Jun 15, 2025 11:37 am
- Forum: Mac OSX
- Topic: How can I unfold a TreeGadget?
- Replies: 8
- Views: 338
Re: How can I unfold a TreeGadget?
Do you mean collapse them all at once?
Procedure OnExpandAll()
Protected i
For i = 0 To CountGadgetItems(0) - 1
SetGadgetItemState(0, i, #PB_Tree_Expanded)
Next
EndProcedure
Procedure OnCollapseAll()
Protected i
For i = 0 To CountGadgetItems(0) - 1
SetGadgetItemState(0, i, #PB_Tree ...
Procedure OnExpandAll()
Protected i
For i = 0 To CountGadgetItems(0) - 1
SetGadgetItemState(0, i, #PB_Tree_Expanded)
Next
EndProcedure
Procedure OnCollapseAll()
Protected i
For i = 0 To CountGadgetItems(0) - 1
SetGadgetItemState(0, i, #PB_Tree ...
- Fri May 30, 2025 8:54 pm
- Forum: Coding Questions
- Topic: Canvas ALT modifier is not recognised - Bug?
- Replies: 14
- Views: 712
Re: Canvas ALT modifier is not recognised - Bug?
I'm on Windows 11. I hear the Windows error sound and see 2 when Alt and another key are pressed and 0 when just Alt is pressed.
- Tue May 27, 2025 4:46 pm
- Forum: Coding Questions
- Topic: Getting a dialog to have spacing='0'
- Replies: 4
- Views: 273
Re: Getting a dialog to have spacing='0'
Use a <singlebox> with a negative margin. I haven't tested this, so I'm not sure if -5 is enough.
Code: Select all
<singlebox margin='-5'> ... </singlebox>
- Wed May 07, 2025 11:28 pm
- Forum: Coding Questions
- Topic: Why does font.pb claim to not compile with the demo version?
- Replies: 1
- Views: 389
Re: Why does font.pb claim to not compile with the demo version?
I installed the demo and it worked, so...maybe an old version of that example used an API call and the comment was never taken out?
- Fri Apr 25, 2025 12:12 am
- Forum: Tricks 'n' Tips
- Topic: Grid - WebView JS (Tabulator)
- Replies: 10
- Views: 2007
Re: Grid - WebView JS (Tabulator)
Thanks, Fred! It looks good in that example.
Hmm, I'm on Windows 11, and I also tested it on macOS. I wonder what the issue could be.
Does it make a difference if the JS and CSS are loaded locally rather than online from the CDN? I load it locally in my project, but I did it from a CDN for this ...
Hmm, I'm on Windows 11, and I also tested it on macOS. I wonder what the issue could be.
Does it make a difference if the JS and CSS are loaded locally rather than online from the CDN? I load it locally in my project, but I did it from a CDN for this ...
- Thu Apr 24, 2025 4:10 am
- Forum: Tricks 'n' Tips
- Topic: Grid - WebView JS (Tabulator)
- Replies: 10
- Views: 2007
Re: Grid - WebView JS (Tabulator)
thanks and good example too.
Thanks!
Here's an example of adding a row header so it's a grid rather than a table. Only the HTML/JS is different.
https://i.imgur.com/XxA9kYk.png
<!doctype html>
<html>
<head>
<style>
.grid {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user ...
- Wed Apr 23, 2025 10:59 pm
- Forum: Tricks 'n' Tips
- Topic: Grid - WebView JS (Tabulator)
- Replies: 10
- Views: 2007
Grid - WebView JS (Tabulator)
You can use the WebViewGadget to implement really good table/grid libraries like Tabulator . This is just a simple example, but the library offers a lot of options.
https://i.imgur.com/RzrdX58.png
HTML:
<!doctype html>
<html>
<head>
<style>
.grid {
-webkit-touch-callout: none; /* iOS Safari ...
https://i.imgur.com/RzrdX58.png
HTML:
<!doctype html>
<html>
<head>
<style>
.grid {
-webkit-touch-callout: none; /* iOS Safari ...
- Thu Apr 10, 2025 1:18 pm
- Forum: Coding Questions
- Topic: EditorGadget scrollbars darkmode issue
- Replies: 5
- Views: 305
Re: EditorGadget scrollbars darkmode issue
You can put it inside a ContainerGadget. It's not perfect - the colour is still lighter than the scrollbars, but it's not white, at least. SetGadgetColor() only seems to affect the left and top edges of that space for some reason.
OpenWindow(0, 30, 30, 500, 400, "Demo1", #PB_Window_SystemMenu ...
OpenWindow(0, 30, 30, 500, 400, "Demo1", #PB_Window_SystemMenu ...
- Tue Apr 08, 2025 3:49 pm
- Forum: Mac OSX
- Topic: Disable JavaScript
- Replies: 1
- Views: 1441
Re: Disable JavaScript
I figured it out:
Code: Select all
webview = CocoaMessage(0, GadgetID(0), "contentView")
config = CocoaMessage(0, webview, "configuration")
preferences = CocoaMessage(0, config, "preferences")
CocoaMessage(0, preferences, "setJavaScriptEnabled:", #False)
- Tue Apr 08, 2025 11:58 am
- Forum: Mac OSX
- Topic: Disable JavaScript
- Replies: 1
- Views: 1441
Disable JavaScript
Hi,
I'm using a popup menu on a WebViewGadget to provide a context menu. The problem is, when the menu is open, the WebViewGadget still responds to the mouse moving, etc., causing issues. I tried DisableGadget, but it didn't work. Is it possible to temporarily disable JavaScript while the menu is ...
I'm using a popup menu on a WebViewGadget to provide a context menu. The problem is, when the menu is open, the WebViewGadget still responds to the mouse moving, etc., causing issues. I tried DisableGadget, but it didn't work. Is it possible to temporarily disable JavaScript while the menu is ...
- Sun Apr 06, 2025 2:46 am
- Forum: Bugs - Linux
- Topic: PB 6.21 Beta 2 - DisableWindow not working correctly with QT Subsystem
- Replies: 3
- Views: 1208
Re: PB 6.21 Beta 2 - DisableWindow not working correctly with QT Subsystem
This is the normal behaviour in Qt, unfortunately: https://www.purebasic.fr/english/viewtopic.php?t=71066.
I try to get it around it in my project by calling setWindowModality (I had to create a shared library/DLL to be able to do this). It would be good if we could do it through QtScript.
I try to get it around it in my project by calling setWindowModality (I had to create a shared library/DLL to be able to do this). It would be good if we could do it through QtScript.
- Tue Apr 01, 2025 7:18 pm
- Forum: Off Topic
- Topic: Happy Birthday, Fred!
- Replies: 22
- Views: 3496
Re: Happy Birthday, Fred!
Happy birthday, Fred!
- Tue Apr 01, 2025 5:04 pm
- Forum: Coding Questions
- Topic: Debug window stuck
- Replies: 2
- Views: 179
Re: Debug window stuck
Windows 11 24H2. PB 6.21 Beta 3 (but it started with Beta 2).
Edit: Seems to be fixed after I managed to minimise the debug window. Strange.
Edit: Seems to be fixed after I managed to minimise the debug window. Strange.