Administrator
|
It's been a while since I last used a container details tree and I have a couple of things I hope others can guide me through. 1) I have a Boolean attribute in a column which edits as a check box. I would like to see it presented as check box all the time, whether editting the field or not. Any idea whether I can do this and how? 2) When I check or uncheck the above check box, I have the domain model update its children to reflect the choice. The UI does not update to show the children having also changed. What have I missed to make the UI refresh the display of all the changed rows? (I have "roll up" model elements that when toggled are intended to toggle the checked state of the next level down.) 3) This is a more general question, but does apply to container details columns. I would like to have the column width automatically reflect the width of the strings in the data model for each column. I am entirely willing to set the column widths by my application code, if the ABT framework cannot automatically do so. Does anyone remember what one needs to do to determine the necessary width of a part to display a given string, taking the part's font into consideration? Thanks in advance, Richard You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Richard, I am in the same boat, so I may not be the best possible adviser here... Am Freitag, 28. Dezember 2018 20:00:47 UTC+1 schrieb Richard Sargent:
I don't think that is easily possible. You can have the cell display a toggle button in edit mode providing an inplace-editing policy, but I don't think there is a setting for the way the boolean is presented when not in driect edit mode other than a textual reperesentation (provicing a converter). This will most likely have to be answered by somebody else...
I guess what you need to do is send #refreshItems (or was it #refreshAllItems ?) to the Container part.
Again, I don't know and I am quite sure this really is something you need to implement by hand. IIIRC, there is a callback for each cell (visualInfoRequested?) but none for the whole column, so you'd have to start by adding some "global" state for each column, have each cell calculate its content width during the population of the container and then update the width of the column. Most likely there is the need to #deferRedraw's during this operation... This, IMO, should be part of the containers anyways, for another reason: cross-platform GUI alignment. Just a little comment: I think none of your questions is exotic or strange, and they all server as great examples for why the ABT layer needs work. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Richard Sargent
Hi Richard,
-- I have a suggestion for your third question. If you can obtain the CgFontStruct of the font used for the data in the cells you can use something like this code to obtain the required width of the column.
Lou On Friday, December 28, 2018 at 2:00:47 PM UTC-5, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
In reply to this post by jtuchel
On Saturday, December 29, 2018 at 5:13:11 AM UTC-8, Joachim Tuchel wrote:
--
Here is an example method that works for my case. You can easily adapt it to other needs. In my case, I have the complete list of strings for each column known a priori, so I can invoke this at window open time. initializeWidthForColumnNamed: aPartName forStrings: someStrings | part widest | part := self subpartNamed: aPartName. widest := someStrings inject: 0 into: [:maxWidth :each | maxWidth max: (each ewWidthUsing: part widget rc)]. part width: widest + 25 This is specifically designed for columns and probably won't work for other parts. The crux of it is the #ewWidthUsing: method.
Agreed. I realize WidgetKit was created for much the same reasons, but it would be nice to see the Abt stuff modernized. Obviously, Instantiations has priorities in what they tackle, and this would be a huge effort.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Am Sonntag, 30. Dezember 2018 08:24:26 UTC+1 schrieb Richard Sargent:
What do you mean by crux? ExtendedWidgets is a layer beneath the Abt layer, so it should be fine, right? Or do you mean it is only implemented on Columns?
The difficulty here is that it is hard to decide these days whether native GUIs will be important enough to justify this effort. These days people seem to move to web based GUIs more and more. Business logic resides in backends, the layer between is some dull http/json protocol these days. "Native Look&Feel" hardly exists any more in Windows. So making a decision of that size (in cost and consequences) is not a nice job. It hasn't been for at least a decade.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Sat, Dec 29, 2018 at 11:47 PM Joachim Tuchel <[hidden email]> wrote:
Crux: 1 : a puzzling or difficult problem : an unsolved question The origin of the word is a scholarly crux. 2 : an essential point requiring resolution or resolving an outcome 3 : a main or central feature (as of an argument) Yes, the layering is fine. And it may be usable for more than just columns. I didn't look once I found table classes with a suitable "rc" for its argument.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |