Search found 2486 matches
- Tue Apr 16, 2024 7:28 am
- Forum: Coding Questions
- Topic: ListIconGadget - resize content to fit perfectly
- Replies: 3
- Views: 252
Re: ListIconGadget - resize content to fit perfectly
Great, seems to work fine here as well :wink: Maybe the following shorter version will also work (needs to be tested on different PC's): ; Define Enumeration #Win #ListSource #Font EndEnumeration #PB_DpiBits= 16 #PB_DpiScale= 1<<#PB_DpiBits #ViewSourceLines=5 Global DpiScale.i Global ListWidth.i Glo...
- Mon Apr 15, 2024 8:10 am
- Forum: Coding Questions
- Topic: ListIconGadget - resize content to fit perfectly
- Replies: 3
- Views: 252
ListIconGadget - resize content to fit perfectly
I'd like to adjust the height of a listicon gadget to show exactly five rows without showing a scrollbar. The column widths have to be adjusted as well to fill the whole space of the gadget. Actually I am using something like the following code, which is not perfect (the left gap seems to be larger ...
- Sun Apr 14, 2024 6:43 pm
- Forum: Coding Questions
- Topic: Autosize ListIconGadget headings based on heading length?
- Replies: 13
- Views: 3231
Re: Autosize ListIconGadget headings based on heading length?
Hm, time for continuing this thread? Was wondering if AutoSize_UseColumn could be speeded up a little bit (see line with '***'), everything else is original Rashad code. :wink: Procedure AUTOSIZE_USEHEADER(gad,font) Header = SendMessage_(GadgetID(gad), #LVM_GETHEADER, 0, 0) nColumns = SendMessage_(H...
- Thu Apr 11, 2024 7:06 am
- Forum: Coding Questions
- Topic: Find two strings (in *memory)...
- Replies: 8
- Views: 410
Re: Find two strings (in *memory)...
Thanks for all your responses, the approach of charvista to collect all founds is a nice one. Meanwhile I tried to put both searches into one loop to avoid scanning the same lines twice. There's still a problem keeping the CRs of the previous lines in memory (so the two if 0 sections are buggy and I...
- Sun Apr 07, 2024 6:16 pm
- Forum: Coding Questions
- Topic: Find two strings (in *memory)...
- Replies: 8
- Views: 410
Re: Find two strings (in *memory)...
The given program does show a practical example including CRLFs (ReplaceString), anyhow some fine tuning will have do be done later on: - case sensitive/insensitive search (which I believe can done by a predefined character array finally) - CR or CRLF could be given in the text which shouldn't be a ...
- Sun Apr 07, 2024 2:52 pm
- Forum: Coding Questions
- Topic: Find two strings (in *memory)...
- Replies: 8
- Views: 410
Re: Find two strings (in *memory)...
Is the text file small enough to fit in memory in one go? Yes, the text will be loaded into memory. No, searching a second time for the next word costs no extra time with my code, since you can set the start address. Look at the loop in the examples. It's not that easy as you don't know which of th...
- Sun Apr 07, 2024 7:13 am
- Forum: Coding Questions
- Topic: Find two strings (in *memory)...
- Replies: 8
- Views: 410
Find two strings (in *memory)...
While thinking about this thread Find a string in *memory , I'd need a super fast solution for finding two strings in a text file where the two strings have to be within a maximum distance of lines. Let's say I am searching for the words 'MAIN' and 'NEARBY' and the maximum distance of the two words ...
- Thu Apr 04, 2024 5:50 pm
- Forum: Coding Questions
- Topic: Dual Support PB604 and PB610 Identification
- Replies: 14
- Views: 682
Re: Dual Support PB604 and PB610 Identification
Endless variations are possible... :wink: CompilerIf #PB_Compiler_Version<600 Debug Mid("ARMX",Bool(#PB_Compiler_Processor&6-6)<<2,3) + Str(32<<Bool(#PB_Compiler_Processor&$D=4)) CompilerElse Debug Mid("ARMX",Bool(#PB_Compiler_Processor&6-6)<<2,3) + Str(32<<#PB_Compil...
- Wed Apr 03, 2024 4:41 pm
- Forum: Coding Questions
- Topic: What is the usecase for BeginVectorLayer()/EndVectorLayer()
- Replies: 3
- Views: 192
Re: What is the usecase for BeginVectorLayer()/EndVectorLayer()
I've used it in several situations, one is for creating shadows for objects which are transparent... Procedure Min(a,b) If a<b ProcedureReturn a Else ProcedureReturn b EndIf EndProcedure Macro StartClipping() SaveVectorState() ClipPath() EndMacro Macro StopClipping() RestoreVectorState() EndMacro Pr...
- Tue Apr 02, 2024 6:04 pm
- Forum: 3D Programming
- Topic: Physics - Airplane
- Replies: 28
- Views: 6577
Re: Physics - Airplane
Extremly cooool! I had a look where some simple modding could be done and the best procedure for doing so seems to be here: Procedure matiere(num,dx,dy,c1,c2, brillance=$888888,alpha=0,scale.f=1,flockcolor=0,flocktilt=0) Protected i CreateTexture(num,dx,dy) StartDrawing(TextureOutput(num)) If alpha:...
- Tue Apr 02, 2024 4:44 pm
- Forum: Coding Questions
- Topic: Dual Support PB604 and PB610 Identification
- Replies: 14
- Views: 682
Re: Dual Support PB604 and PB610 Identification
Brute short version...
Code: Select all
a=(#PB_Compiler_Processor-1)/2
Debug Mid("ARMX",(~a&2)<<1,3) + Str(32<<Bool(a%3))
- Mon Mar 25, 2024 3:14 pm
- Forum: The PureBasic Editor
- Topic: [IDE Tool] Search in PB Files
- Replies: 10
- Views: 569
Re: [IDE Tool] Search in PB Files
Quick hack to show the source code matching the search text (maybe this should be shown in a text box instead of a tooltip)... ...maybe the number of the files in the result list should also be seen in the status line. Anyhow there are some issues here, starting a second search immediately after the...
- Fri Mar 22, 2024 3:28 pm
- Forum: Coding Questions
- Topic: [Solved] Global Chr() problem
- Replies: 19
- Views: 785
Re: Global Chr() problem
Tried different compiler versions and fonts, didn't see a problem here... ...maybe some additional clues in the message requester will show something?! Global extdot$=Chr($2024) ; And what about using other characters - Chr(8226) - will they be all invinsible? Procedure foo(file$, ext$) MessageReque...
- Thu Mar 21, 2024 4:21 pm
- Forum: Off Topic
- Topic: Wifi activity detection ...
- Replies: 6
- Views: 583
- Sun Mar 17, 2024 3:12 pm
- Forum: Coding Questions
- Topic: Programming a Timer
- Replies: 14
- Views: 582
Re: Programming a Timer
Not a solution for you (windows) but maybe an inspiration (also for creating more console apps)... :wink: ; Define 500 lines of code EnableExplicit #Q=#DOUBLEQUOTE$ #Shades=4 #ConsoleTitle="Console Clock by Michael Vogel" Global Dim Pattern(#Shades) Structure CharType Width.i Height.i Spac...