ControlsGadget()

Share your advanced PureBasic knowledge/code with the community.
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

ControlsGadget()

Post by mestnyi »

Another example on canvas. :)
I would like you to check it on different operating systems
http://purebasic.info/phpBB3ex/viewtopi ... ead#p81949
Last edited by mestnyi on Mon Jan 25, 2016 2:24 pm, edited 13 times in total.
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: ControlsGadget()

Post by bbanelli »

[18:46:55] [ERROR] Line: 478
[18:46:55] [ERROR] WaitWindowEvent(): WindowEvent() and WaitWindowEvent() can not be called from a 'binded' event callback.
[18:47:01] Execution continued.
[18:47:01] [ERROR] Line: 771
[18:47:01] [ERROR] Invalid memory access. (read error at address 8)
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: ControlsGadget()

Post by mestnyi »

Now you try, you will not work?
User avatar
blueb
Addict
Addict
Posts: 1116
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: ControlsGadget()

Post by blueb »

Works well on:

PureBasic 5.41 LTS (x86) on Windows 10

Nice work... hopefully this will be the start of a Drag'N'Drop Visual Designer tool :mrgreen:
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: ControlsGadget()

Post by Kwai chang caine »

8) Works very well and is very nice on W7 with PB v5.23 8)
Blueb wrote:hopefully this will be the start of a Drag'N'Drop Visual Designer tool
Yeeeeess !!! i hope too.

Image

They are several open source IDE, but nothing fully coding for visual designer :cry:

So for the moment, already a great thanks for sharing this, and PropertiesGadget() code 8) 8)
ImageThe happiness is a road...
Not a destination
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 676
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: ControlsGadget()

Post by Kurzer »

Hello mestnyi, this works great and looks good with Windows XP SP3 / 32 Bit. Image

But please mention in your first post that your code leaves over some files in PureBasics theme directory (or clean up the theme directory after unpacking and reading the BMP files).

btw: I would also be very happy if you plan to program a good substitute for the current Formdesigner. ;)
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
Wolfram
Enthusiast
Enthusiast
Posts: 606
Joined: Thu May 30, 2013 4:39 pm

Re: ControlsGadget()

Post by Wolfram »

Thanks! Works on OSX too.
macOS Catalina 10.15.7
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: ControlsGadget()

Post by Andre »

While this code seems to be a nice piece of code too, I couldn't test...

Get a 'PB Linker Error' using PB5.41b1 on MacOS 10.6.8 with following message
Undefined symbols:
"_CCCryptorCreateWithMode", referenced from:
_aes_ctr_init in libpbarchive.a(archive_cryptor.o)
"_CCKeyDerivationPBKDF", referenced from:
_pbkdf2_sha1 in libpbarchive.a(archive_cryptor.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Any ideas?

@Wolfram: which PB and MacOS versions do you use?
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Wolfram
Enthusiast
Enthusiast
Posts: 606
Joined: Thu May 30, 2013 4:39 pm

Re: ControlsGadget()

Post by Wolfram »

Hello Andre,

I tested it on OSX 10.7.5, PB 5.31 x86 and PB 5.41b1 x86.
macOS Catalina 10.15.7
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: ControlsGadget()

Post by Keya »

Andre wrote:
Undefined symbols:
"_CCCryptorCreateWithMode", referenced from:
_aes_ctr_init in libpbarchive.a(archive_cryptor.o)
"_CCKeyDerivationPBKDF", referenced from:
_pbkdf2_sha1 in libpbarchive.a(archive_cryptor.o)
It would be great if PB exported an interface to the PBKDF2 function! because there currently isnt a KDF for PB according to google, and if libpbarchive already has one ... :)
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: ControlsGadget()

Post by mestnyi »

I'm glad that it works.
that your code leaves over some files in PureBasics theme directory
Well, I'll do
But if I could get the icons from an archive without extracting it.
How it is implemented in purebasiс
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: ControlsGadget()

Post by mestnyi »

Updated first post code
When you change the window size changes the size of the content
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: ControlsGadget()

Post by Kukulkan »

Hello,

being curious I just tried it on my PB 5.24 LTS on Kubuntu (32 Bit). It does not resize the canvas initially. It does a resize only if I manually resize. I also cant use the scrollbar to scroll the controls list. It always moves the whole window. Thus, scrolling the list only works using mouse-wheel or clicking the scrollbar arrows.

Kukulkan
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: ControlsGadget()

Post by mestnyi »

It does not resize the canvas initially
This is due to different behavior in various systems
when you create a window in the windows occurs resize event as in Linux not.
look now :)
It always moves the whole window
it does not quite understand
mestnyi
Addict
Addict
Posts: 1098
Joined: Mon Nov 25, 2013 6:41 am

Re: ControlsGadget()

Post by mestnyi »

Added screenshot and updated the code.
But please mention in your first post that your code leaves over some files in PureBasics theme directory (or clean up the theme directory after unpacking and reading the BMP files).
Now Untraceable
So I think I can not upload a file, I leave the link
Post Reply