Search found 11 matches

by mikeschn
Wed Aug 23, 2017 12:40 am
Forum: Coding Questions
Topic: Source code for a text editor?
Replies: 4
Views: 2428

Re: Source code for a text editor?

Awesome!

Thanks guys!

Mike...
by mikeschn
Tue Aug 22, 2017 12:24 am
Forum: Coding Questions
Topic: Source code for a text editor?
Replies: 4
Views: 2428

Source code for a text editor?

Hi Guys,

It's been many years since I've played with Purebasic programming, and it's time to pick it up again.

I'm thinking I'd like to start with a simple text editing program.

Can anyone point me to some sample code that I can look at that would help me develop a text editor?

I don't want ...
by mikeschn
Mon Dec 12, 2016 1:50 am
Forum: The PureBasic Editor
Topic: PB Editor running in hidpi, 4K?
Replies: 0
Views: 3464

PB Editor running in hidpi, 4K?

Are there any plans to make the PB Editor run in a hidpi (4k, 3840x2160) display?

When I run the PB editor at 3840x2160 (with desktop scaling @2.0) all sorts of things get chopped in half, and the toolbar icons are also very tiny.

And when I try to use the form editor, all the gadget icons run ...
by mikeschn
Tue Jun 25, 2013 12:37 am
Forum: Coding Questions
Topic: program path$ or default dir$?
Replies: 9
Views: 1187

Re: program path$ or default dir$?

I just changed my program from CreateFile(4,GetCurrentDirectory()+struct_Filename$)

to

CreateFile(4,GetPathPart(ProgramFilename())+struct_Filename$)

Now I find it drops the file in c:\users\Mike\AppData\Local

instead of c:\users\mike\documents\myprogram

I am not running from the .exe file ...
by mikeschn
Sun Jun 23, 2013 12:42 am
Forum: Coding Questions
Topic: files in a specific directory with a specific extension
Replies: 3
Views: 514

files in a specific directory with a specific extension

I've looked and looked, and I can not see how to do this...

I need a list of files in a specific directory with a specific extension. And I need to be able to fill and array with the file names.

for example:

I need a list of all the files in c:\myprogram with the file extension *.m_p

and I ...
by mikeschn
Sat Jun 22, 2013 8:36 pm
Forum: General Discussion
Topic: I thought Purebasic had a grid gadget.
Replies: 2
Views: 1226

I thought Purebasic had a grid gadget.

I thought Purebasic had a grid gadget. I can't find it in v5.11

Did it use to exist in an older version? Will it be available in a future version (that you know of)?

Mike...
by mikeschn
Sat Jun 22, 2013 8:32 pm
Forum: Coding Questions
Topic: program path$ or default dir$?
Replies: 9
Views: 1187

Re: program path$ or default dir$?

I guess I'd better use

Code: Select all

GetPathPart(ProgramFilename()
since I do need the path to my exe file...

Thanks again!

Mike...
by mikeschn
Sat Jun 22, 2013 6:25 pm
Forum: Coding Questions
Topic: program path$ or default dir$?
Replies: 9
Views: 1187

Re: program path$ or default dir$?

GetCurrentDirectory() is the one I needed.

Thanks

Mike...
by mikeschn
Sat Jun 22, 2013 5:50 pm
Forum: Coding Questions
Topic: program path$ or default dir$?
Replies: 9
Views: 1187

program path$ or default dir$?

I am writing a program called material.exe

if I drop it in a directory called c:\material

Is there a command that'll put that directory into a variable with out having to hard code it into the program or putting it into a config file?

ie. program_path$ = ???

or default_dir$ = ???

Thanks ...
by mikeschn
Sat Jun 22, 2013 2:54 pm
Forum: Coding Questions
Topic: Is there a way to swap out the name of a constant using a
Replies: 3
Views: 857

Re: Is there a way to swap out the name of a constant using

That worked! I made sure my constants were in some kind of order, and got the value of the first constant in the series... :D

Procedure printgrid()
partno_control_number = #String_partno_line0
partname_control_number = #String_partname_line0
vol_control_number = #String_vol_line0
den_control ...
by mikeschn
Sat Jun 22, 2013 1:45 pm
Forum: Coding Questions
Topic: Is there a way to swap out the name of a constant using a
Replies: 3
Views: 857

Is there a way to swap out the name of a constant using a

Is there a way to swap out the name of a constant using a variable?

for example, in the procedure below, can I change #String_partno_line0 to #String_partno_line+x?

so that I don't have to type the SetGadgetText(#string_partno_line... 100 times?





Procedure printgrid()
For x = 1 To 100 ...