Page 1 of 1

Gadget Properties Questions

Posted: Mon Jan 04, 2010 10:57 am
by Übermann
1.- Does exists any property from a TextBox, Label and/or EditArea Gadgets to set they to Multiline Editing? This is, when the text into such gadgets reach their max width, automatically jump to the next line. Basically like in Visual Basic.

2.- How can I set the index value of a ComboBox or a Listbox? As happens in Visua Basic, i can write:

Code: Select all

MyList.ListIndex = 1
And the second element of that list will be selected/highlighted.

I took a look at the docs, but i found nothing similar. I need something like:

Code: Select all

SetGadgedPropertie(#MyListbox, Index, 1)

Thanks in advance.

Re: Gadget Properties Questions

Posted: Mon Jan 04, 2010 11:01 am
by srod
Use an editor gadget if you need multiline editing. SetGadgetState() is the command you are looking for in order to set a combo's selected item.

Re: Gadget Properties Questions

Posted: Mon Jan 04, 2010 11:08 am
by Übermann
Damn fast answer. Thanks a lot
srod wrote:Use an editor gadget if you need multiline editing.
The problem with that is that it has a 3D Border, and i need something that can look like a Label, such a Label itself or a TextBox.
Well, if no other choice is available, i will use that.
srod wrote:SetGadgetState() is the command you are looking for in order to set a combo's selected item.
I tested, and works. Thanks.

Re: Gadget Properties Questions

Posted: Mon Jan 04, 2010 11:25 am
by srod
On Windows only...

Code: Select all

If OpenWindow(0, 0, 0, 322, 205, "StringGadget Flags", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  StringGadget(0, 8,  10, 306, 120, "Normal StringGadget...", #ES_MULTILINE|#ESB_DISABLE_LEFT|#ESB_DISABLE_RIGHT|#ES_AUTOVSCROLL)
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf