ComboBox Problems

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 Danilo.

Hello !!

I need a ComboBoxGadget in another Window,
not the Main Window.

So i thought i can add the ComboBoxGadget
to a PanelGadget, but it doesnt work like
i need it.

I cant make a PanelGadget and
add a ComboBox without using
AddGadgetItem(PanelGadget, 1, "")
before i add the ComboBox.

Thats not what i need, because
i dont want to see that "Panel".

Frame3DGadget doesnt work with
ComboBox.... hmmm...

Which Window (Gadget) can i use
to place a ComboBoxGadget inside ??

Thanks,
...Danilo

(registered PureBasic user)
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 fred.

You can use this:

*Panel = PanelGadget()...
UseGadgetList(*Panel)
ComboBoxGadget()...

should work, not tested tough.

Fred - AlphaSND
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 Danilo.

Thanks Fred, it works !!

Problem: The PanelGadget has a border.

I need to place the ComboBoxGadget
on a Window (PanelGadget or any other window)
without a border.
If there isnt a way to do this with
build-in gadgets/windows, i have to
write my own "secret window" command... :)

Thanks,
...Danilo

(registered PureBasic user)
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 Danilo.

Another Problem:

*panel = PanelGadget(1, 30, 30, 130, 19)
ClosePanelGadget()
AttachToolBar(0, *panel)

works great, but

AttachMenu(0, *panel)

doesnt work... :(

cya,
...Danilo

(registered PureBasic user)
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 Franco.

Well Danilo,
sure you can attach a ComboBox to another Window as the main Window.
Use:
UseWindow(#Window)
before you build your Gadget with:
ComboBoxGadget()...

The same with Toolbars!
Example:
OpenWindow(0,.....
OpenWindow(1,.....
OpenWindow(2,.....
UseWindow(0)
CreateToolBar(0)
MenuItem(...
AttachToolBar(0, WindowID())
UseWindow(1)
CreateToolBar(1)
MenuItem(...
AttachToolBar(1, WindowID())
UseWindow(2)
CreateToolBar(2)
MenuItem(...
AttachToolBar(2, WindowID())

I'm just working on a bigger project and it worked fine with 3 Windows and different Gadgets on each Window.
Null Problemo!

Have a nice day...
Franco

Edited by - franco on 02 January 2002 01:57:21
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 fred.

Try to use SetWindowLong_() API command to change the border style (don't know if PanelGadget allow that..)

Fred - AlphaSND
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 Danilo.

Hello Fred and Franco !!

Franco:
It doesnt work for what i want to do.
I´m writing a Hardcore-Library, so that
beginners stuff doesnt work.... :wink:


Fred:
Any chance to change the menu library,
so menus can be attached to any window ??

Code: Select all

>*panel = PanelGadget(1, 30, 30, 130, 19)
>ClosePanelGadget()
>AttachToolBar(0, *panel)
>
>works great, but
>
>AttachMenu(0, *panel)
>
>doesnt work... :(
Ughhh, ..I badly need the support for
calling PB-commands from my library...

cya,
...Danilo

(registered PureBasic user)
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 fred.
Fred:
Any chance to change the menu library,
so menus can be attached to any window ??
You notice than AttachMenu take a WindowID() which means ANY window. I guess than a menu can't be added to a child window (makes senses)..

Fred - AlphaSND
Post Reply