My generic notepad template

Share your advanced PureBasic knowledge/code with the community.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

My generic notepad template

Post by utopiomania »

del
Last edited by utopiomania on Wed Apr 25, 2012 8:02 pm, edited 3 times in total.
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: My generic notepad template

Post by WilliamL »

Can't, it doesn't run on a Mac. :lol:
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: My generic notepad template

Post by Kwai chang caine »

Cool job 8)

Just for information :wink:
Like usually, KCC is the king for found bug, i click one or two time and find one :(
Line 1319 when i click "Help/About"
ImageThe happiness is a road...
Not a destination
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: My generic notepad template

Post by rsts »

Very nice. :)

Many thanks for sharing.

cheers
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: My generic notepad template

Post by Rook Zimbabwe »

Very nice job!

I have a question (because I don't know)

why did you use:

Code: Select all

SendMessage_(GadgetID(#EDIT1), #EM_SETTEXTMODE, #TM_PLAINTEXT, 0)
Instead of SetGadgetFont(#Gadget, FontID) ? set to the default system font?

I know I am missing something important here!!! :mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: My generic notepad template

Post by rsts »

It's not a font setting. That sets the editor to plaintext instead of rich text.

cheers
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: My generic notepad template

Post by idle »

looks good thanks.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: My generic notepad template

Post by Rook Zimbabwe »

AHhhh so if we wanted to reset that we would change the handle: #TM_PLAINTEXT to #TM_RTFTEXT ??? :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: My generic notepad template

Post by utopiomania »

Thanks, ppl! Hope you can use it. BTW, you can use it as you wish, I won't kill you, I kill nothing, not even
insects if i can avoid it.

@Rook, #TM_RTFTEXT? Read The F(beep)in Text? :)
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: My generic notepad template

Post by SFSxOI »

@utopiomania

Thank you very much, very nice.

I won't steal it, can I sell it though? :)
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: My generic notepad template

Post by Rook Zimbabwe »

utopiomania wrote:Thanks, ppl! Hope you can use it. BTW, you can use it as you wish, I won't kill you, I kill nothing, not even
insects if i can avoid it.

@Rook, #TM_RTFTEXT? Read The F(beep)in Text? :)
I have always thought that was what it stood for anyway! :wink:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: My generic notepad template

Post by utopiomania »

I won't steal it, can I sell it though?
Yes, please sell it if you can! :)

@Kwai Chain Cheek, what was the bug report about. The 'about' box is using the IE webgadget, are you using
Mozilla instead?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: My generic notepad template

Post by ts-soft »

utopiomania wrote: @Kwai Chain Cheek, what was the bug report about. The 'about' box is using the IE webgadget, are you using
Mozilla instead?
There is a IMA in:

Code: Select all

AddKeyboardShortcut(win, #PB_Shortcut_Return, btn1)
btn1 is to big for menuitem!

greetings
Thomas
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: My generic notepad template

Post by utopiomania »

Code: Select all

;ok button
    btn1 = buttonGadget(#PB_ANY, 156, 405, 100, 26, "Ok", #PB_BUTTON_DEFAULT)
    addKeyboardShortcut(win, #PB_SHORTCUT_RETURN, btn1)
I don't get it? The button is 100 by 26. It is too big for what menu item?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: My generic notepad template

Post by ts-soft »

The last parameter of AddKeyBoardShortcut is a menuitemid (event), only numbers from 0 to 64000)
btn1 is a pointer (result of #PB_Any) and the value is to high for this.
Post Reply