Search found 752 matches

by Lord
Wed Apr 03, 2024 11:58 am
Forum: Coding Questions
Topic: Using ListIconGadget with #PB_ListIcon_ColumnAlignment
Replies: 3
Views: 156

Re: Using ListIconGadget with #PB_ListIcon_ColumnAlignment

Hi HeX0R and BarryG!

Thank you for your explainations.
Now it works as it should.
by Lord
Wed Apr 03, 2024 9:29 am
Forum: Coding Questions
Topic: Using ListIconGadget with #PB_ListIcon_ColumnAlignment
Replies: 3
Views: 156

Using ListIconGadget with #PB_ListIcon_ColumnAlignment

Hi! With PBv6.10 you can set the alignment for each column in a ListIconGadget. Question: What is the recommendet value for "Item" in SetGadgetItemAttribute()? Is it #PB_Ignore, #PB_Any or what? "Item" seems to have no relevance. You can only set alignement for the header. How do...
by Lord
Thu Mar 21, 2024 12:24 pm
Forum: Feature Requests and Wishlists
Topic: #PB_ScrollArea_ClipMouse
Replies: 0
Views: 141

#PB_ScrollArea_ClipMouse

Hi!

Can we get a nativ #PB_ScrollArea_ClipMouse for ScrollAreaGadget() as
a demonstrated here:
https://www.purebasic.fr/english/viewtopic.php?t=83683 ?

It is helpfull if a canvas in a scrollarea is larger than scrollarea itself.
by Lord
Fri Mar 01, 2024 11:39 am
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Re: Canvas and #PB_Canvas_ClipMouse

Hi Rashad!
RASHAD wrote: Fri Mar 01, 2024 9:51 am ...

Code: Select all

        GetWindowRect_(GadgetID(0),r.RECT)
        r\bottom - 20
        r\right - 20
        ClipCursor_(r)
That is a really nice, elegant and short solution. :D
Thank you for your always inspiring coding examples.
by Lord
Fri Mar 01, 2024 9:31 am
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Re: Canvas and #PB_Canvas_ClipMouse

Hi Rashad! Thanks again for your (always) tips and tricks. I use your SetRect_(r,GadgetX(0,#PB_Gadget_ScreenCoordinate),GadgetY(0,#PB_Gadget_ScreenCoordinate),GadgetX(0,#PB_Gadget_ScreenCoordinate)+GadgetWidth(0),GadgetY(0,#PB_Gadget_ScreenCoordinate)+GadgetHeight(0)) to limit the mouse inside scrol...
by Lord
Thu Feb 29, 2024 8:01 pm
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Re: Canvas and #PB_Canvas_ClipMouse

Hi Rashad!

Your example works great.
I've inserted it in my code without any trouble.
Thank you for your help.
by Lord
Thu Feb 29, 2024 4:12 pm
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Re: Canvas and #PB_Canvas_ClipMouse

Hi, its me again with a question related to the problem above.

Is there a way to create a "ScrollAreaClipMouse" or would
this be a feature request?
by Lord
Thu Feb 29, 2024 2:37 pm
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Re: Canvas and #PB_Canvas_ClipMouse

Hi Olli, hi Rashad! If you activate the canvas, what does it happen ? SetActiveGadget(2) That's not the problem. :oops: Hi PB 6.04 x86 Windows 11 x64 OpenWindow(1, 10, 10, 1024, 768, "", #PB_Window_SystemMenu) ScrollAreaGadget(1, 0, 0, WindowWidth(1), WindowHeight(1), WindowWidth(1), Windo...
by Lord
Thu Feb 29, 2024 11:13 am
Forum: Coding Questions
Topic: Canvas and #PB_Canvas_ClipMouse
Replies: 11
Views: 433

Canvas and #PB_Canvas_ClipMouse

Hi! Just a simple question: What is missing in my code snippet to get the mouse stopping at canvas/scrollarea border? OpenWindow(1, 10, 10, 1024, 768, "", #PB_Window_SystemMenu) ScrollAreaGadget(1, 0, 0, WindowWidth(1), WindowHeight(1), 0, 0, 100) CanvasGadget(2, 0, 0, WindowWidth(1), Wind...
by Lord
Sun Feb 04, 2024 10:15 am
Forum: Coding Questions
Topic: PB 6.10 Beta 2/3: SetActiveGadget not working
Replies: 9
Views: 509

Re: PB 6.10 Beta 2/3: SetActiveGadget not working

chk1 <> btn1
chk1 <> btn2
by Lord
Fri Dec 22, 2023 5:43 pm
Forum: Mac OSX
Topic: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1
Replies: 19
Views: 1406

Re: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1

Hi Mindphazer & Piero! Thanks to both of you for trying to solve this (my) little problem. Again, it does not work here. Static pgm ... ... file=#DQUOTE$+file+#DQUOTE$ PV.s = ~"\"Preview\"" If pgm simpleShell("osascript -e 'tell app " + PV + " to quit'") s...
by Lord
Fri Dec 22, 2023 12:37 pm
Forum: Mac OSX
Topic: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1
Replies: 19
Views: 1406

Re: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1

Hi Piero! Thank you for looking into the problem. Your simpleShell() doesn't work as wanted/expected. Runnig the procedure with "to close window 1" doesn't close the just opened "preview"-window. Subsequent opening next picture(s) opens another "preview" and so on. Runn...
by Lord
Thu Dec 21, 2023 3:43 pm
Forum: Mac OSX
Topic: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1
Replies: 19
Views: 1406

Re: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1

Hi Mindphazer! Thank you for helping again. ... you can use the pkill command : RunProgram("pkill", PV, "") Yes, after executing this command, the "Preview" is closed. But... is a differentr picture opened with this above mentioned code, the picture is not opened. Only ...
by Lord
Thu Dec 21, 2023 11:54 am
Forum: Mac OSX
Topic: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1
Replies: 19
Views: 1406

Re: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1

Hi infratec! Btw.: 'open' is a filename. ('type open' in a terminal and it shows you the location of it) It is like 'cmd' to start something in a windows shell. It is a program which decides what to do with the given file. In Linux you use 'xdg-open' to achieve the same. Thank you for your explanati...
by Lord
Wed Dec 20, 2023 3:55 pm
Forum: Mac OSX
Topic: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1
Replies: 19
Views: 1406

Re: Viewing *.PNG, *.PDF and *.JPG on MacBook with m1

It is working! Kind of...

What did I do?
I enclosed the filename including the path in double quotes
(most of PDF-filenames included spaces, pics don't have).
And I removed the Killprogram() part. So the Pic/PDF has to
be closed manually.

Thanks for helping!