Another ColorRequester (Cross-platform)

Share your advanced PureBasic knowledge/code with the community.
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: Another ColorRequester (Cross-platform)

Post by Zapman »

Jacobus wrote: Tue Dec 03, 2024 7:09 pmHello Zapman,
Your ColorRequester() is very nice :) Another great Zapman gadget, you should join Fred and the Fantaisie software team... :lol:
:oops: That's a bit too much :)
But if you want another one, I invite you to test PBBrowser viewtopic.php?t=85837.
I'd love to have your opinion and test returns.
User avatar
Mijikai
Addict
Addict
Posts: 1517
Joined: Sun Sep 11, 2016 2:17 pm

Re: Another ColorRequester (Cross-platform)

Post by Mijikai »

StringGadgets are abit too small again.
Image
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: Another ColorRequester (Cross-platform)

Post by Zapman »

Mijikai wrote: Wed Dec 04, 2024 7:21 pm StringGadgets are abit too small again.
That is quite strange because the TextWidth() function that I use now to set both the Legends width and the strings width seems to work well for the legend. :shock:
This is probably due to the rounded shape of the input widgets.
Anyway, I added

Code: Select all

  CompilerIf #PB_Compiler_OS = #PB_OS_Linux
    ECGadgets\InputWidth + 20
    ECGadgets\HexColorWidth + 20
  CompilerEndIf
to solve the problem.

I am very grateful to you for testing again, and happy to see that the background color for trackbar gadgets works well.
Thank you.
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: Another ColorRequester (Cross-platform)

Post by AZJIO »

On Linux, it is better to use #PB_Window_SizeGadget so that you can increase the size of the window to fit the font.
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: Another ColorRequester (Cross-platform)

Post by Zapman »

The code in the first post of this subject had been optimized for multilanguage support.
User avatar
Zapman
Enthusiast
Enthusiast
Posts: 205
Joined: Tue Jan 07, 2020 7:27 pm

Re: Another ColorRequester (Cross-platform)

Post by Zapman »

The code in the first post of this subject had been optimized for better window positioning.

CAUTION: the parameters of the ZapmanColorRequester function have been modified. If you have allready included this function in one of your project while using the ParentWindow parameter, you will have to adapt your code.
Post Reply