PureRESIZE library : gadget automatic resizing and more

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- Fixed : PureRESIZE_SetWindowMinimumSize() and PureRESIZE_SetWindowMaximumSize() did not work without a previous PureRESIZE_SetGadgetResize() call
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
chen
Enthusiast
Enthusiast
Posts: 338
Joined: Fri Dec 23, 2005 2:20 pm
Location: Quebec, Canada
Contact:

Post by chen »

gnozal,

Im so new to purebasic that Im checking all the tools can help me
to make easy my work....

I think your library is so useful, I have tested it and works great in
windows XP.

Is it cross-platform (LINUX, MAC, WINDOWS)? , sorry fro the
question, maybe for all of you is obvious

:oops:
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

chen wrote:gnozal,
I think your library is so useful, I have tested it and works great in windows XP.
Thanks
chen wrote:Is it cross-platform (LINUX, MAC, WINDOWS)?
No, my libs are for Windows only because I use Windows API calls and I don't have MacOSX nor Linux.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

cross-platform resize

Post by USCode »

Chen,
FYI - Here's a link to the original Resize lib that I wrote that IS cross-platform and even provides the source code. Not sure if it works with 4.0 but could certainly be made 4.0 compliant without much effort:

viewtopic.php?t=10218&highlight=
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Cool USCode, i modified your source 2 weeks ago to run in V4 and implement it in VD 8)

It was still on my todo list :wink:
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

ResizeGadgets for PB 4.0

Post by USCode »

That's great Berikco, looking forward to the new version of VD! Thanks!

I just went through the code quickly tonight and updated it for 4.0 based on what I was able to ascertain from the readme file. I'm a little rusty with PB, I haven't been able to work with it for awhile but I've added a 4.0 version to my original forum post of this code.
chen
Enthusiast
Enthusiast
Posts: 338
Joined: Fri Dec 23, 2005 2:20 pm
Location: Quebec, Canada
Contact:

POLINK using PureRESIZE and PureCOLOR.

Post by chen »

Hi,

I just installed PureRESIZE lib and the examples run OK...

but in my app I get the error:

POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
POLINK: fatal error: 1 unresolved external(s).

I tested the same error in JaPBe and PB IDE...

I need to open "Project options" and unable "Thread safe executable"

All my app run with this option enable....

The command Im using is:

Code: Select all

PureRESIZE_SetWindowMinimumSize(#window1, 600, 500) 
My app run OK without PureRESIZE lib.

Same problem with PureColor lib.

Ohh... I forgot... I downloaded libs for PB4 (I know you are working here
maybe thats the problem)

What do I need to do here?? :cry:
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

The libs don't work with 'ThreadSafe' enabled.

Look at http://www.purebasic.fr/english/viewtop ... 2&start=15
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
chen
Enthusiast
Enthusiast
Posts: 338
Joined: Fri Dec 23, 2005 2:20 pm
Location: Quebec, Canada
Contact:

Post by chen »

gnozal wrote:The libs don't work with 'ThreadSafe' enabled.

Look at http://www.purebasic.fr/english/viewtop ... 2&start=15

and with unicode flag uncheck.... is this true?

at least I need to disable unicode option in jaPBe for pureRESIZE to work
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

chen wrote:
gnozal wrote:The libs don't work with 'ThreadSafe' enabled.

Look at http://www.purebasic.fr/english/viewtop ... 2&start=15

and with unicode flag uncheck.... is this true?

at least I need to disable unicode option in jaPBe for pureRESIZE to work
Yes, the libs are compiled with UNICODE UNCHECKED
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
chen
Enthusiast
Enthusiast
Posts: 338
Joined: Fri Dec 23, 2005 2:20 pm
Location: Quebec, Canada
Contact:

Post by chen »

gnozal wrote:
chen wrote:
gnozal wrote:The libs don't work with 'ThreadSafe' enabled.

Look at http://www.purebasic.fr/english/viewtop ... 2&start=15

and with unicode flag uncheck.... is this true?

at least I need to disable unicode option in jaPBe for pureRESIZE to work
Yes, the libs are compiled with UNICODE UNCHECKED
gnozal... is there some reason to compile without unicode option?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

chen wrote:
gnozal wrote:
chen wrote:
gnozal wrote:The libs don't work with 'ThreadSafe' enabled.

Look at http://www.purebasic.fr/english/viewtop ... 2&start=15

and with unicode flag uncheck.... is this true?

at least I need to disable unicode option in jaPBe for pureRESIZE to work
Yes, the libs are compiled with UNICODE UNCHECKED
gnozal... is there some reason to compile without unicode option?
Yes :
1. Tailbite ; AFAIK the current version of Tailbite does not handle unicode.
2. I am usually working on Win98SE : not a unicode OS.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
yabune
User
User
Posts: 65
Joined: Mon Aug 22, 2005 2:31 pm

Post by yabune »

Is it possible to make your lib work with StatusBar?

Thanks!
danraymond
User
User
Posts: 43
Joined: Wed Jun 28, 2006 6:02 am

So why doesn't this work?

Post by danraymond »

Dear gnozal;

have just tried your form designer and also resize. for PB4

your form generates the following code with resize enabled but the editor gadget doesn't resize, why?

also I can't get the parent check box to allow to be checked in the extras section where you specify resizing (bug or design)?

thanks
Dan Raymond

Code: Select all

;{- Constants
;{ Windows
Enumeration
  #Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
  #EditorGadget_0
EndEnumeration
;}
;}
Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 450, 200, 400, 400, "#Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#Window_0))
      EditorGadget(#EditorGadget_0, 70, 20, 280, 340)
      ; Gadget Resizing
      PureRESIZE_SetGadgetResize(#EditorGadget_0, 1, 1, 0, 0)
      ; Gadget Colors
      PureCOLOR_SetGadgetColor(#EditorGadget_0, #PureCOLOR_SystemColor, $C4F1F2)
    EndIf
  EndIf
EndProcedure

OpenWindow_Window_0()

;{- Event loop
Repeat
  Event = WaitWindowEvent()
  Select Event
    ; ///////////////////
    Case #PB_Event_Gadget
      EventGadget = EventGadget()
      EventType = EventType()
      If EventGadget = #EditorGadget_0
      EndIf
    ; //////////////////////
    Case #PB_Event_CloseWindow
      EventWindow = EventWindow()
      If EventWindow = #Window_0
        Break
      EndIf
  EndSelect
Forever
;}

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: So why doesn't this work?

Post by gnozal »

danraymond wrote:Dear gnozal;
have just tried your form designer and also resize. for PB4 your form generates the following code with resize enabled but the editor gadget doesn't resize, why?
I don't know how you want it to be resized, but if you add lock bottom and lock right in PureFORM it works well :
Code : PureRESIZE_SetGadgetResize(#EditorGadget_0,1,1,1,1)
Note that you can test the resizing in 'Preview' or 'Compile/Run' mode.
danraymond wrote: also I can't get the parent check box to allow to be checked in the extras section where you specify resizing (bug or design)?
Works here.
Note : obviously you can only check 'Relative to parent gadget' if the gadget has a parent gadget (like ContainerGadget, PanelGadget ...) :wink:
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply