ComboBox Question/Bug

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

I searched the forum and found a topic talking about a problem where the combobox fires a rightclick event even though you click the left mouse button. Well it still isn't fixed. Plus I want to know how I can use the comboBaox like Internet Exploreer uses it, When you type in it and the hit the enter key it loads that page. I can't seem to get that event in the combobox. I presently use a keyboard shortcut but that causes the page to reload even if you are not typing in the combobox.

Please help,

- Ryan
RJP Computing

WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
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.

Code: Select all

OpenWindow(1,200,200,400,200,#PB_WINDOW_SystemMenu,"")
   CreateGadgetList(WindowID())
   hCombo = ComboBoxGadget(1,10,10,300,100,#PB_ComboBox_Editable)
   AddKeyboardShortcut(1,#PB_Shortcut_Return,100)

   hComboEdit = ChildWindowFromPoint_(hCombo,5,5)

Repeat
   Select WaitWindowEvent()
      Case #PB_EventCloseWindow: End
      Case #PB_EventMenu
        If EventMenuID() = 100 And GetFocus_() = hComboEdit
           MessageRequester("Info","You pressed RETURN in the combobox!",0)
        EndIf
      Case #PB_EventGadget
   EndSelect
ForEver
Works fine here... :)

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

yes your example works fine but what about the combBox firing the wong event. It fires a right click event for a left click event.

@Danilo can you explain what hComboEdit = ChildWindowFromPoint_(hCombo,5,5) does. I am tring to impliment that into my current code and I am having probles.

Thanks,

- Ryan
RJP Computing

WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
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.

> yes your example works fine but what about the combBox firing the wong event.
> It fires a right click event for a left click event.

Thats a PureBasic internal thing.
The EventType() command is wrong here but Fred
doesnt fix it.
I cant change that.. and i dont care anymore.
(this is known for a while.. :cry:)

> @Danilo can you explain what hComboEdit = ChildWindowFromPoint_(hCombo,5,5) does.
> I am tring to impliment that into my current code and I am having probles.

It gets the handle of edit part in a editable combobox,
so you can check if Focus is in the combobox edit area.
hCombo is the GadgetID() of your combobox.

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 TronDoc.
Originally posted by Danilo

Thats a PureBasic internal thing.
The EventType() command is wrong here but Fred
doesnt fix it.
I cant change that.. and i dont care anymore.
(this is known for a while.. :cry:) ...Danilo
c'mon Danilo! I hope you still care. Your postings have been a big help to me even though I don't often post replies. Thank you. Joe B.

elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE :wink:
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 Kendrel.

well... i can understand danilo, and i think all the important bugs should be fixed before we get more and more commands.... ive also been in trouble with the combobox (selecting an item), and was getting mad... the basic things should work... my 2 cents!
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.

TronDoc: It wasnt ment in a bad way.

Its just that i dont care about such things
anymore when the bugs get not fixed for some time.

If i would still care _that_ much, i would get angry
and ask 'why the hell this f*ckin sh*t isnt corrected' yet.

But i dont do so... because i want a more relaxed life. :)

Generally i still care about PureBasic's future, otherwise
i wouldnt be here anymore, you know.
I just cant and dont want to annoy Fred for 3 month and
ask everyday when it gets fixed.
Well, when it doesnt get fixed its annoying for the users/
programmers that want to make some appz... hmmm

Anyway... try to have some fun while coding.

cya,
...Danilo
(registered PureBasic user)
Post Reply