Where is the TextBox Gadget?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by anil.

Hi,

I cannot find a TextBox Gadget. I want a box (like the one I am typing in right now) in a form where a message can be typed. Can anyone help me please?

Thanks,
Anil
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Berikco.

Hi Anil,

I think you need StringGadget.

Code: Select all

StringGadget()

Syntax

StringGadget(#Gadget, x, y, Width, Heigth, Content$ [, Flags]) 
Description

Creates a String gadget in the current GadgetList. #Gadget will be the number returned by EventGadgetID() command. 'Content$' specify the initial content of this StringGadget. Later the content can be changed with the commands SetGadgetText() and GetGadgetText(). 

'Flags' are optionnals and can be composed of one of the following constants: 
  #PB_String_Password   : Password like, displaying only '*' instead of normal characters 
  #PB_String_ReadOnly   : Read only mode. No text can be entered. 
  #PB_String_Numeric    : Only numbers are accepted. 
  #PB_String_LowerCase  : All characters are converted in lower case automatically 
  #PB_String_UpperCase  : All characters are converted in upper case automatically 
  #PB_String_BorderLess : No borders are drawn around the gadget 



Or if you need multiline box, use a richedit, check out.
http://www.reelmediaproductions.com/pb/lib/richedit.zip

Benny


http://www.benny.zeb.be
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.

Nah, you'd be better off with a RichEdit (IIRC that's the only thing available for PB right now). Do a search on the forum for it.



--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.20)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by anil.

Hey, I found this on this forum and it works!

StringGadget(0,10,10,300,200,"",#ES_MULTILINE|#ES_AUTOVSCROLL|#WS_VSCROLL)
Post Reply