Editorgadget and pics?

Just starting out? Need help? Post your questions and find answers here.
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Editorgadget and pics?

Post by nicolaus »

hello

first sorry for my bad English i´m from the german forum.

I would like set a pic (smili) in a EditorGadget but i find no way to do this.
Can someone help me here?

THX Nico
TronDoc
Enthusiast
Enthusiast
Posts: 310
Joined: Wed Apr 30, 2003 3:50 am
Location: 3DoorsDown

Post by TronDoc »

this is all I can find on the subject
which seems to indicate it can't be done:
viewtopic.php?t=7090&start=0&postdays=0 ... itorgadget
but I know there are examples in the CodeArchive that have
an image that appears to be overlayed on a window..
..maybe that approach would work.
did you see this example in the CodeArchive? PictureViewerJPEG+.pb
Joe
peace
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Editorgadget and pics?

Post by PB »

> I would like set a pic (smili) in a EditorGadget

This is NOT what you want, but I couldn't resist :D

Code: Select all

If OpenWindow(1,300,250,400,200,#PB_Window_SystemMenu,"Window")
  CreateGadgetList(WindowID())
  smiley=LoadFont(1,"WingDings",90)
  EditorGadget(1,10,10,300,150)
  SetGadgetFont(1,smiley)
  SetGadgetText(1,"J")
  Repeat : Until WaitWindowEvent()=#PB_EventCloseWindow
EndIf
TronDoc
Enthusiast
Enthusiast
Posts: 310
Joined: Wed Apr 30, 2003 3:50 am
Location: 3DoorsDown

Post by TronDoc »

still could come in handy! :wink:
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

@PB
very nice that is wat i will but have you a list for smilis-code?

THX for all helps
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> very nice that is wat i will but have you a list for smilis-code?

I don't know of any list -- just change the "J" to other characters to see
what they represent. I don't think you can mix fonts with the EditorGadget
though -- so you'll be restricted to graphics only if you use this font.
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> I don't think you can mix fonts with the EditorGadget
though

Just use the set of functions here:
viewtopic.php?p=28616#28616

And then you can do it like this:

Code: Select all

If OpenWindow(1,300,250,400,200,#PB_Window_SystemMenu,"Window") 
  CreateGadgetList(WindowID()) 
  EditorGadget(1,10,10,300,150) 

  SetGadgetText(1, "Here comes a nice J Smiley.")

  Editor_Select(1, 0, 19, 0, 20)
  Editor_Font(1, "WingDings")
  Editor_FontSize(1, 20)    
  Editor_Color(1, $0000FF)
  
  Repeat : Until WaitWindowEvent()=#PB_EventCloseWindow 
EndIf 
Timo
quidquid Latine dictum sit altum videtur
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> > I don't think you can mix fonts with the EditorGadget though
>
> Just use the set of functions here:
> viewtopic.php?p=28616

Cool, thanks for that! :D
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

@freak

THX very nice.
For my project this is wat i will :-)

Nico
Post Reply