Author Topic: wxSmith  (Read 11137 times)

Offline winnie

  • Single posting newcomer
  • *
  • Posts: 9
wxSmith
« on: August 10, 2017, 08:02:35 pm »
In wxSmith the wxComboBox and wxChoice missed the alignment styles. One could always add the missing styles in the costructor of the dialog but would be usefull to see them with the other styles.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith
« Reply #1 on: August 10, 2017, 10:03:04 pm »
Can you describe the problem with a bit more details?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline winnie

  • Single posting newcomer
  • *
  • Posts: 9
Re: wxSmith
« Reply #2 on: August 12, 2017, 11:57:11 am »
When I use the plugin wxSmith to develop a wxWidgets application in the properties window of the object wxComboBox and wxChoice there is a field called Styles. In the styles that you can choose from the gui the alignment is not included. I think it would be usefull to have the chance to choose also the alignment of these objects.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxSmith
« Reply #3 on: August 13, 2017, 01:24:40 pm »
can you post this in the bug tracker of sf? Only in the forum it will get lost..

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith
« Reply #4 on: August 13, 2017, 03:06:52 pm »
winnie:
The alignments (center, vertical, horizontal) are set using separate properties.
Can't you use them? Why? Can you post the exact style constants you need to use?
Just keep in mind that setting the vertical alignment in a vertical sizer doesn't make sense, there are similar restrictions for the other sizer types.
If you use wx3.x you'll get asserts for such invalid cases.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Lives here!
  • ****
  • Posts: 500
Re: wxSmith
« Reply #5 on: August 13, 2017, 08:46:19 pm »
I dont think he is talking about sizer flags but the control itself. Some controls offer flags for alignment of their content, these were added in wx 3.x, wxSmith is probably still on wx 2.8 state and doesnt know them.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith
« Reply #6 on: August 13, 2017, 10:41:48 pm »
I don't see anything related to alignment in the docs for wxComboBox, nor for wxChoice.
I'm looking here: http://docs.wxwidgets.org/trunk/classwx_combo_box.html
Until I have clear idea what the problem is I can't do much.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline winnie

  • Single posting newcomer
  • *
  • Posts: 9
Re: wxSmith
« Reply #7 on: August 14, 2017, 09:32:17 pm »
I'm talking about the alignment of the text of the control. The default alignment is wxALIGN_LEFT but if you have to choose between numbers it would be usefull to can chose also wxALIGN_RIGHT. You can set it in the constructor of the object and it works so the wxComboBox and wxChoice have also this kind of Styles but wxSmith doesn't display them.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith
« Reply #8 on: August 14, 2017, 11:43:28 pm »
winnie: Can you show a code example? Link to documentation?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline winnie

  • Single posting newcomer
  • *
  • Posts: 9
Re: wxSmith
« Reply #9 on: August 15, 2017, 10:46:35 am »
I'm sorry, you are right the problem was with wxSpinCtrl.

This is the code of the constructor:
Cost = new wxSpinCtrl(this, ID_SPINCTRL1, _T("1"), wxPoint(656,136), wxSize(135,27), wxALIGN_RIGHT, 1, 100, 1, _T("ID_SPINCTRL1"));

Here is the documentation:
http://docs.wxwidgets.org/3.1/classwx_spin_ctrl.html#ac5defa94e938dd00380f551502c20a4e

wxSmith doesn't allow to set the style wxALIGN_RIGHT that I have inserted in the constructor by hand.
I'm sorry for the error, the first time I have used a ComboBox then I have change my mind and I have chose a SpinCtrl so the problem was with the latter.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxSmith
« Reply #10 on: August 15, 2017, 11:55:31 pm »
Fixed in rev 11154, but I'm not sure this is the best way to do it...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]