Search found 604 matches

by wombats
Sat Sep 20, 2025 8:20 pm
Forum: Mac OSX
Topic: Bundle name?
Replies: 7
Views: 1172

Re: Bundle name?

I do, yes. I like to create a program to be launched after build to handle adding things to the app bundle.
by wombats
Sat Sep 20, 2025 5:38 pm
Forum: Mac OSX
Topic: Bundle name?
Replies: 7
Views: 1172

Re: Bundle name?

Are you using Projects? You can setup different targets and specify a filename for the output executable, then build them at the bottom of the "Compiler" menu.
by wombats
Sun Sep 07, 2025 1:51 am
Forum: Coding Questions
Topic: Mouse LeftClick Scintilla
Replies: 9
Views: 1336

Re: Mouse LeftClick Scintilla

To turn off the default editing menu, you can set #SCI_USEPOPUP to #SC_POPUP_NEVER (or 0): https://scintilla.org/ScintillaDoc.html#SCI_USEPOPUP.

Code: Select all

ScintillaSendMessage(Gadget, #SCI_USEPOPUP, #SC_POPUP_NEVER)
by wombats
Sun Aug 10, 2025 11:23 pm
Forum: Coding Questions
Topic: Is it possible to hide/show ogre 3D view
Replies: 5
Views: 456

Re: Is it possible to hide/show ogre 3D view

Do you mean something like this? Only tested on macOS. InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()

OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 100, 90, "Hide")
OpenWindow(1, 0, 0, 640, 480, "", #PB_Window_WindowCentered ...
by wombats
Thu Jun 19, 2025 10:28 am
Forum: Bugs - Mac OSX
Topic: [Done] Menu destroyed on dialog close
Replies: 6
Views: 1452

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.
by wombats
Mon Jun 16, 2025 2:20 pm
Forum: Bugs - Mac OSX
Topic: [Done] Menu destroyed on dialog close
Replies: 6
Views: 1452

[Done] 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 ...
by wombats
Sun Jun 15, 2025 11:37 am
Forum: Mac OSX
Topic: How can I unfold a TreeGadget?
Replies: 8
Views: 1226

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 ...
by wombats
Fri May 30, 2025 8:54 pm
Forum: Coding Questions
Topic: Canvas ALT modifier is not recognised - Bug?
Replies: 14
Views: 1078

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.
by wombats
Tue May 27, 2025 4:46 pm
Forum: Coding Questions
Topic: Getting a dialog to have spacing='0'
Replies: 4
Views: 404

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>
by wombats
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: 435

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?
by wombats
Fri Apr 25, 2025 12:12 am
Forum: Tricks 'n' Tips
Topic: Grid - WebView JS (Tabulator)
Replies: 10
Views: 2476

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 ...
by wombats
Thu Apr 24, 2025 4:10 am
Forum: Tricks 'n' Tips
Topic: Grid - WebView JS (Tabulator)
Replies: 10
Views: 2476

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 ...
by wombats
Wed Apr 23, 2025 10:59 pm
Forum: Tricks 'n' Tips
Topic: Grid - WebView JS (Tabulator)
Replies: 10
Views: 2476

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 ...
by wombats
Thu Apr 10, 2025 1:18 pm
Forum: Coding Questions
Topic: EditorGadget scrollbars darkmode issue
Replies: 5
Views: 419

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 ...
by wombats
Tue Apr 08, 2025 3:49 pm
Forum: Mac OSX
Topic: Disable JavaScript
Replies: 1
Views: 1828

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)