wxLua splitter window on resize - lua

In the image snippet below, there is a splitter-sash between the tan Output window and the blue Command Line Args window. The user can change the width of the blue window (by dragging the splitter sash) if desired, but I want the blue window to maintain its width if the app is resized, that is, the tan window does all the horizontal shrinking and growing.
In my XRC file for the app, I have a BoxSizerH containing a vertical splitter. The splitter holds two panels. Each panel contains a StaticBoxSizerV holding a multi-line text control.
What must I do to allow the user to fix the width of the right-most window?
Do I need to trap resizes and set the sash position to maintain the last trapped splitter drag, or is there an easier way just using initial settings?

Checkout wxSplitterWindow::SetSashGravity in the docs:
http://docs.wxwidgets.org/trunk/classwx_splitter_window.html#a3c52925dffd02509d110086d4bb29373

Related

iOS re-order control overlay cell

When having a black background ListView in iOS and setting the edit property to true, shows the re-order control (white horizontal lines icon) in the right hand side as it should. It also shows the delete icon on the left side of the cell and then shifts the contents to the right.
The problem is this; the re-order icon overlays the white text of the cell and you can not see the icon. I know we can't change the background of the re-order control. What am I missing that the content view is not resized but shifted during the re-order?
So as it turns out, the content view label was auto sizing to the entire width of the row. After removing this, the label resizes appropriately.

Retrieving Storyboard element that is outside of the frame

I'm working with an xcode storyboard. I was resizing a label and it pushed a UIImage outside of the frame, so I can no longer see it. I can't grab it. How do I move it back on the frame so I can see it?
I can verify that it is in my tableview cell, because it is still listed under the content view on the left bar.
Thanks
You can also select the element from you view controller scene from the document outline (on the left) and move it around with your keyboard arrow keys (double click so it's grey and not blue, if it's blue you will navigate the scene). I use the arrow keys most often to position my elements relative to each other. Holding the option key while moving the mouse to different elements gives alignment and distance guidelines to other objects while you move with the arrow keys.
On the left side of the storyboard, expand the elements for your UITableViewCell. You should see the UImage listed. Click on it, then go into the right menu and change the x,y coordinates. It'll now put it back to where you can see it and edit it.
Also just be careful about having your UIImage object as the bottom layer. I've hidden things from myself when they were accidentally put as the bottom layer.
There is a better way for Xcode 10 and above:
Navigate to the storyboard
Choose the controller of the controller scene you want to see the element of
Under size inspector, select 'Freeform' from the Simulated size dropdown
Increase the width/height and hit return.
After you have laid out all elements in the canvas and no longer want to see elements which are outside of frame, revert back to 'Fixed' simulated size under Size inspector.

TStringGrid doesn't draw scrollbars

I have a form with TStringGrid component on it. Property Scrollbars of TStringGrid is set to ssBoth. If i make the window smaller, scrollbars doesnt appear. Instead of this client area of TStringGrid is cropped. I would prefer if scrollbars were disabled if application window has enough size and automatically enabled if I shrink window size under critical value. Do you have any idea what I am doing wrong?
thruthseeker got it. If you haven't either anchored the grid, or otherwise auto-scale it to the size of the window, then it won't change size with the window, and thus won't have its own scroll bars.

How to ownerdraw the scroll buttons in a scrollable Tmenu (or Tpopupmenu)?

By setting a MIM_MAXHEIGHT with SetMenuInfo, I can control the max height of a [popup]menu. When the menu appears, if it needs more height than MIM_MAXHEIGHT, it will have 2 scrollbuttons (one at the top, the second at the bottom)
I do draw myself the menuitems to theme them with various flavours.
But my OnDrawItem or OnMeasureItem are never called for drawing the scrollbuttons.
So my question is : How to ownerdraw the scroll buttons in a scrollable Tmenu (or Tpopupmenu)? Is it even possible?
Looking at the MSDN documentaiton, I don't think you can not owerdraw those buttons, as they are not part of the menu items, but of the menu itself.
The menu itself only has very few flags you can define; the only modify the background.
This link describes (an English translation of) how to to this.
Or this link on the Embarcadero forum.
What is possible is to set a background color to the menu (MIM_BACKGROUND) and giving to the hbrBack member a Tbrush.handle with a predefined color.
that is not perfect but often, themes use a single color to backgroud the menuitems. By this way, the scroll buttons will be colored with the background color

Best method to scroll a ScrollPane by mouse hover location in actionscript?

When mouse nears top edge of scrollpane, it scrolls up until it reaches the top only interrupted if the mouse leaves the top edge area.
Same for bottom edge.
You need to make a symbol that you can write AS code on that is invisible (set alpha to 0) and lies in the area you want to have the desired behavior to occur.
make sure its a button symbol
on the mouseover for your hidden symbol you tell your pane to scroll.
on the mouseout for your hidden symbol you tell your pane to stop scrolling.
Keep your hidden symbols on a higher layer than your scroll pane.

Resources