https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • h

    hallowed-ocean-84954

    12/19/2022, 4:00 PM
    within it is a listview which identifies which help topic is displayed but that's not the pulldown's own value - it's within it
  • h

    hallowed-ocean-84954

    12/19/2022, 4:01 PM
    I want to set the selected item in that listview
  • h

    hallowed-ocean-84954

    12/19/2022, 4:02 PM
    I am likely going to have to do some sort of indirect mailbox thing where the config event handler stashes the value where the dropdown can get it when it materializes the dropdownview
  • h

    hallowed-ocean-84954

    12/19/2022, 4:02 PM
    I've tried a couple of things so far but not cracked it yet
  • h

    hallowed-ocean-84954

    12/19/2022, 4:03 PM
    I cannot really get a handle on the instance of the class that is instantiated by the dropdownhandler from other bits of code
  • h

    hallowed-ocean-84954

    12/19/2022, 4:03 PM
    anyhow, need to play with it more and see if I can come up with something
  • b

    bright-gpu-74537

    12/19/2022, 4:07 PM
    right, so you basically want to set the selected item of a list (that is a child) of the dropdown popup?
  • h

    hallowed-ocean-84954

    12/19/2022, 4:07 PM
    right
  • b

    bright-gpu-74537

    12/19/2022, 4:08 PM
    so, i would implement the
    set_selectedItem
    in the dropdown handler, and then use
    mySuperDropdown.selectedItem = "something"
  • b

    bright-gpu-74537

    12/19/2022, 4:09 PM
    then when you show the popup, make sure that selected item is selected
  • b

    bright-gpu-74537

    12/19/2022, 4:10 PM
    kinda like this: https://github.com/haxeui/haxeui-core/blob/master/haxe/ui/components/popups/ColorPickerPopup.hx#L63-L83
  • h

    hallowed-ocean-84954

    12/19/2022, 4:10 PM
    I saw set_selectedItem but I thought that applied to the dropdown's own list - I guess you're suggesting "subverting" that behaviour slightly and having it operate on the dropdown popup child listview
  • h

    hallowed-ocean-84954

    12/19/2022, 4:10 PM
    that could work
  • b

    bright-gpu-74537

    12/19/2022, 4:10 PM
    well, set_selectedItem (in the handler) does nothing unless you make it do something
  • b

    bright-gpu-74537

    12/19/2022, 4:11 PM
    when you call .selectedItem on the dropdown it will pass it onto the handler
  • b

    bright-gpu-74537

    12/19/2022, 4:11 PM
    (which may, or may not, have a view yet)
  • h

    hallowed-ocean-84954

    12/19/2022, 4:11 PM
    oh I see. hmmmm.... oh I see
  • h

    hallowed-ocean-84954

    12/19/2022, 4:11 PM
    and if there is now view will it instantiate it then or do I need to cache the value
  • b

    bright-gpu-74537

    12/19/2022, 4:12 PM
    well, you can i guess, though i would just cache it for when you do create a view
  • h

    hallowed-ocean-84954

    12/19/2022, 4:12 PM
    got it
  • h

    hallowed-ocean-84954

    12/19/2022, 4:12 PM
    I'll give it a whirl - thanx
  • b

    bright-gpu-74537

    12/19/2022, 4:13 PM
    np - just keep in mind that creating the view (popup) is a user interaction generally, setting the selected item (or index) doesnt have to be
  • h

    hallowed-ocean-84954

    12/19/2022, 4:13 PM
    ok - makes sense - thanx
  • b

    bright-gpu-74537

    12/19/2022, 4:14 PM
    np - sounds like a better example is needed in the component explorer, the one there is pretty basic - it doesnt deal with selections or anything like that
  • h

    hallowed-ocean-84954

    12/19/2022, 4:14 PM
    it would probably help. A commented example explaining the moving parts would help a lot
  • h

    hallowed-ocean-84954

    12/19/2022, 4:15 PM
    I mostly cobbled this together by franken-coding from the two examples - the demo and the color picker - and didn't quite get it right initially
  • b

    bright-gpu-74537

    12/19/2022, 4:16 PM
    yeah, thats cool though i like what you have come up with... its neat... and i think you are the only person to have ever explored that part of haxeui
  • f

    full-journalist-82607

    12/19/2022, 4:17 PM
    I have maybe a few bugs with tabs in hxWidgets . - The most important one for me is that events.SHOWN actually happens for children components when it's ready ( it seems) , and not where it shown. - SelectedPage makes the app crash. - And button with groups act like individual buttons.
  • h

    hallowed-ocean-84954

    12/19/2022, 4:18 PM
    I have to say I am making a simple walk through of Learn OpenGL into a major project with tons of feature creep - but I hope to use it for future reference or so that other people can follow it - and hey I'm learning tons of stuff I hope to reuse later
  • b

    bright-gpu-74537

    12/19/2022, 4:19 PM
    will check it out... if you mean a buttonbar, there is nothing like that in hxwidgets
1...134213431344...1687Latest