Help with GUI

This topic contains 3 replies, has 2 voices, and was last updated by  Hezkore 2 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7190

    Hezkore
    Participant

    I can’t for the life of me figure out how to make a DockingView at the left side of the screen (say 50% or so) with a TextView at the top, a few checkboxes under it and a button at the bottom.
    The TextView never fully covers the entire area, it just sits as a tiny bar at the top.

    UPDATE: Okay so I think I’ve got it figured out…

    #7197

    Hezkore
    Participant

    Another question regarding the GUI…

    How would I get the width of a DockingView that is resizable?
    The draggable knob, or whatever, never seems to be taken into account when testing for width.

    Also, how do detect if a mouse click is inside my DockingView or the main window canvas?

    And is there any way to get images from the theme?
    I know there’s App.Theme.OpenImage but that only loads an image from the theme folder, I want to specify a image name in the theme json file and somehow get that in the app.

    Finally, is there a way to remove spaces at the start of a word-wrapped line in the TextView?
    Cause, this:  isn’t very pretty.
    The space before “to” should be removed.

    #7220

    nerobot
    Participant

    1. Width – you can catch onLayout processing by extending mojox view. But when I tried to do that I got endless onLayout queue…

    2. Mouse click – look at OnMouseEvent (or OnContentMouseEvent) but need to extend mojox view to use this way.

    3. Have no on the box. Hm, maybe we can write theme extension class to get that stuff.

    4. Remove spaces – small fix in textview needed. Maybe I’ll create patch..

    #7268

    Hezkore
    Participant

    I’ve managed to get images from a theme using “skins”.
    They’re automatically loaded once the theme is applied.

    In the theme file you’ll have to add something like:

    Don’t forget that it needs to go under “styles”:{ in the theme file and the image has to be in the “themes” folder!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.