[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some gui questions
From: |
Wolfgang Lux |
Subject: |
Re: some gui questions |
Date: |
Wed, 12 Dec 2012 20:06:51 +0100 |
Sebastian Reitenbach wrote:
> Hi,
>
> On Wednesday, December 12, 2012 16:50 CET, Wolfgang Lux
> <wolfgang.lux@gmail.com> wrote:
>
>> Sebastian Reitenbach wrote:
>>
>>> for the MPDCon I created an Inspector for the Playlist. There I have some
>>> checkboxes.
>>> I tried to align it in Gorm, but failed a bit do get the text on the left
>>> aligned on the grid with the other
>>> text there. The checkbox itself on the right aligns fine. In the Screenshot
>>> you can see that
>>> the text for the checkboxes is some pixels to the right compared with the
>>> other text around them.
>>> Is this intended, or should it align with the text?
>>
>> I guess the texts should align. But until this is fixed your only chance is
>> to do the alignment manually (by adding or subtracting a few pixels on the x
>> coordinate in Gorm's size inspector).
>
> for the time being, I can live with that, probably should open a bug report
> for Gorm then, to get it fixed ;)
I'm not sure this is a Gorm bug. It may as well be a gui bug.
>
>>
>>> Also, I tried to disable the rating stars, and make the text grey, when the
>>> checkboxes are disabled,
>>> but failed with that. When I disable the top checkbox,I can disable the
>>> second checkbox,
>>> with setEnabled:NO and its getting greyed out, and you cannot click on it.
>>> But for the Text, and the stars I did not found something working, I also
>>> wanted to have the text
>>> grey the same way like when the checkbox is disabled.
>>
>> Have you tried setEnabled: NO? This should change the text to grey.
>
> The problem I have with that is, that I don't know how to address the text.
> In Gorm its just an
> NSTextField, but I don't know how to give it a name, and how to address it in
> the code.
You should do it in the usual way, i.e., create an outlet for the text field
and then connect the text string in Gorm to that outlet.
>>> The Stars are a NSTableView, with a table, containing just one single cell.
>>> I tried to set
>>> the cell setEditable: NO but to no avail.
>>> Any hint how I can achieve that?
>>
>> Why do you use a table and not a NSTextField? But anyway, setEnabled should
>> work for a NSTextFieldCell inside a table as well.
>
> I also use the same stars in the Playlist. The stars, and the rating, is
> shamelessly stolen from Grr.
>
> To make them not editable, I tried that:
> [minRatingCell setEditable: NO];
> [maxRatingCell setEditable: NO];
> [minRatingCell setEnabled: NO];
> [maxRatingCell setEnabled: NO];
>
> but I still can edit the cells, i.e. change the amount of stars when clicking
> on them.
>
> The SongRatingCell is a subclass of NSCell:
> @interface SongRatingCell : NSCell
Hmmm, I haven't looked at the source, but then I guess it probably ignores the
is_disabled and is_editable attributes of the cell.
Wolfgang